diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-04-11 12:19:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-04-11 12:19:55 +0200 |
commit | 38c918ff27e5a90c1a17f3989a78c7fca564c47a (patch) | |
tree | 926616f78b59fc0fa3d5e6e643f787f4a9fdcb2f /src/namestore/plugin_namestore_postgres.c | |
parent | 7fe5d70497352ea453289fc582089ac1c352204a (diff) | |
download | gnunet-38c918ff27e5a90c1a17f3989a78c7fca564c47a.tar.gz gnunet-38c918ff27e5a90c1a17f3989a78c7fca564c47a.zip |
support async commit
Diffstat (limited to 'src/namestore/plugin_namestore_postgres.c')
-rw-r--r-- | src/namestore/plugin_namestore_postgres.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/namestore/plugin_namestore_postgres.c b/src/namestore/plugin_namestore_postgres.c index 872bf75cb..4828cb190 100644 --- a/src/namestore/plugin_namestore_postgres.c +++ b/src/namestore/plugin_namestore_postgres.c | |||
@@ -93,6 +93,25 @@ database_setup (struct Plugin *plugin) | |||
93 | if (GNUNET_YES == | 93 | if (GNUNET_YES == |
94 | GNUNET_CONFIGURATION_get_value_yesno (plugin->cfg, | 94 | GNUNET_CONFIGURATION_get_value_yesno (plugin->cfg, |
95 | "namestore-postgres", | 95 | "namestore-postgres", |
96 | "ASYNC_COMMIT")) | ||
97 | { | ||
98 | struct GNUNET_PQ_ExecuteStatement es[] = { | ||
99 | GNUNET_PQ_make_try_execute ("SET synchronous_commit TO off"), | ||
100 | GNUNET_PQ_EXECUTE_STATEMENT_END | ||
101 | }; | ||
102 | |||
103 | if (GNUNET_OK != | ||
104 | GNUNET_PQ_exec_statements (plugin->dbh, | ||
105 | es)) | ||
106 | { | ||
107 | PQfinish (plugin->dbh); | ||
108 | plugin->dbh = NULL; | ||
109 | return GNUNET_SYSERR; | ||
110 | } | ||
111 | } | ||
112 | if (GNUNET_YES == | ||
113 | GNUNET_CONFIGURATION_get_value_yesno (plugin->cfg, | ||
114 | "namestore-postgres", | ||
96 | "TEMPORARY_TABLE")) | 115 | "TEMPORARY_TABLE")) |
97 | { | 116 | { |
98 | cr = &es_temporary; | 117 | cr = &es_temporary; |