From: Sebastian Harl Date: Wed, 14 Nov 2012 20:08:42 +0000 (+0100) Subject: postgresql plugin: Don't try to restart a failed transaction when there's none. X-Git-Tag: collectd-5.2.0~13^2~8 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=adda7be62dd6ba9e4939d1a65f84ac055416266b;p=collectd.git postgresql plugin: Don't try to restart a failed transaction when there's none. --- diff --git a/src/postgresql.c b/src/postgresql.c index 8a9fa101..ff6fa860 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -888,7 +888,7 @@ static int c_psql_write (const data_set_t *ds, const value_list_t *vl, params[4], params[5], params[6], params[7]); /* this will abort any current transaction -> restart */ - if (db->commit_interval > 0) + if (db->next_commit > 0) if (c_psql_commit (db) == 0) c_psql_begin (db);