From c92a38927231949b4f5b9a133c6934b04031339c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 2 Jan 2024 13:30:29 +0100 Subject: fix reconnect commit statement problem --- src/backenddb/plugin_merchantdb_postgres.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/backenddb/plugin_merchantdb_postgres.c') 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; } -- cgit v1.2.3