summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2ac944)
raw | patch | inline | side by side (parent: f2ac944)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Nov 2012 19:05:33 +0000 (20:05 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 14 Nov 2012 19:05:33 +0000 (20:05 +0100) |
The failed query inside the transaction causes the transaction to be aborted
and all subsequent queries to fail as well.
and all subsequent queries to fail as well.
src/postgresql.c | patch | blob | history |
diff --git a/src/postgresql.c b/src/postgresql.c
index 9b264d9e7c4a291de84b877a1c0761ef93115d39..8a9fa10186fa6ae102435cd9f0c1cd9996b0ccde 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
writer->statement,
params[0], params[1], params[2], params[3],
params[4], params[5], params[6], params[7]);
+
+ /* this will abort any current transaction -> restart */
+ if (db->commit_interval > 0)
+ if (c_psql_commit (db) == 0)
+ c_psql_begin (db);
+
pthread_mutex_unlock (&db->db_lock);
return -1;
}