diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-01-02 13:30:29 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-01-02 13:30:29 +0100 |
commit | c92a38927231949b4f5b9a133c6934b04031339c (patch) | |
tree | 0ec0f9f9e44acff62296597139620be8caf17395 /src/backenddb/plugin_merchantdb_postgres.c | |
parent | 673edc82adea15b687cafac882f3f71409ac5aad (diff) | |
download | merchant-c92a38927231949b4f5b9a133c6934b04031339c.tar.gz merchant-c92a38927231949b4f5b9a133c6934b04031339c.tar.bz2 merchant-c92a38927231949b4f5b9a133c6934b04031339c.zip |
fix reconnect commit statement problem
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 38dd636e..30f5c169 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -300,21 +300,17 @@ check_connection (struct PostgresClosure *pg) GNUNET_PQ_reconnect_if_down (pg->conn); } + /** * Establish connection to the database. * * @param cls plugin context * @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure */ -static int +static enum GNUNET_GenericReturnValue postgres_connect (void *cls) { struct PostgresClosure *pg = cls; - struct GNUNET_PQ_PreparedStatement ps[] = { - GNUNET_PQ_make_prepare ("end_transaction", - "COMMIT"), - GNUNET_PQ_PREPARED_STATEMENT_END - }; struct GNUNET_PQ_ExecuteStatement es[] = { GNUNET_PQ_make_try_execute ("SET search_path TO merchant;"), GNUNET_PQ_EXECUTE_STATEMENT_END @@ -324,7 +320,7 @@ postgres_connect (void *cls) "merchantdb-postgres", NULL, es, - ps); + NULL); pg->prep_gen++; if (NULL == pg->conn) return GNUNET_SYSERR; @@ -618,7 +614,6 @@ libtaler_plugin_merchantdb_postgres_init (void *cls) = &TMH_PG_update_token_family; - return plugin; } |