summaryrefslogtreecommitdiff
path: root/src/backenddb/plugin_merchantdb_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-09-02 15:25:07 +0200
committerChristian Grothoff <christian@grothoff.org>2017-09-02 15:25:07 +0200
commitbaff321b2bc9979c02a7d0a02e6440c3ee2403be (patch)
tree3baa88c50d1ff8800630d9501c8aa58494b74d03 /src/backenddb/plugin_merchantdb_postgres.c
parent791fa31684c9670863c17f7c7f438b7c79c6f7f9 (diff)
downloadmerchant-baff321b2bc9979c02a7d0a02e6440c3ee2403be.tar.gz
merchant-baff321b2bc9979c02a7d0a02e6440c3ee2403be.tar.bz2
merchant-baff321b2bc9979c02a7d0a02e6440c3ee2403be.zip
fix bad nesting of transactions during /pay processing
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 019af0db..249c0fab 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -528,6 +528,8 @@ postgres_start (void *cls)
ExecStatusType ex;
check_connection (pg);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Starting merchant DB transaction\n");
result = PQexec (pg->conn,
"START TRANSACTION ISOLATION LEVEL SERIALIZABLE");
if (PGRES_COMMAND_OK !=
@@ -557,6 +559,8 @@ postgres_rollback (void *cls)
struct PostgresClosure *pg = cls;
PGresult *result;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Rolling back merchant DB transaction\n");
result = PQexec (pg->conn,
"ROLLBACK");
GNUNET_break (PGRES_COMMAND_OK ==
@@ -579,6 +583,8 @@ postgres_commit (void *cls)
GNUNET_PQ_query_param_end
};
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Committing merchant DB transaction\n");
return GNUNET_PQ_eval_prepared_non_select (pg->conn,
"end_transaction",
params);