[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: ignore prepared statement failures if st
From: |
gnunet |
Subject: |
[gnunet] branch master updated: ignore prepared statement failures if statement is already known to enable connection pooling |
Date: |
Tue, 30 Nov 2021 16:14:46 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new f80d6d695 ignore prepared statement failures if statement is already
known to enable connection pooling
f80d6d695 is described below
commit f80d6d695a76113ce5537592539bf38c35367fd7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Nov 30 16:14:35 2021 +0100
ignore prepared statement failures if statement is already known to enable
connection pooling
---
src/pq/pq_prepare.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/pq/pq_prepare.c b/src/pq/pq_prepare.c
index 76fc5c374..fcf1cc793 100644
--- a/src/pq/pq_prepare.c
+++ b/src/pq/pq_prepare.c
@@ -106,12 +106,22 @@ GNUNET_PQ_prepare_statements (struct GNUNET_PQ_Context
*db,
{
GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
"pq",
- _ ("PQprepare (`%s' as `%s') failed with error: %s\n"),
+ "PQprepare (`%s' as `%s') failed with error: %s\n",
ps[i].sql,
ps[i].name,
PQerrorMessage (db->conn));
PQclear (ret);
- return GNUNET_SYSERR;
+ ret = PQdescribePrepared (db->conn,
+ ps[i].name);
+ if (PGRES_COMMAND_OK != PQresultStatus (ret))
+ {
+ PQclear (ret);
+ return GNUNET_SYSERR;
+ }
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR,
+ "pq",
+ "Statement `%s' already known. Ignoring the issue in
the hope that you are using connection pooling...\n",
+ ps[i].name);
}
PQclear (ret);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: ignore prepared statement failures if statement is already known to enable connection pooling,
gnunet <=