[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: -fix issue with multiple dbinit
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: -fix issue with multiple dbinit running concurrently |
Date: |
Sun, 27 Aug 2023 14:06:39 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new e7a67dfb -fix issue with multiple dbinit running concurrently
new 37e4d6ab Merge branch 'master' of git+ssh://git.taler.net/exchange
e7a67dfb is described below
commit e7a67dfbb515c71e9fbefe9e30ec1a2e017adf38
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Sun Aug 27 14:06:28 2023 +0200
-fix issue with multiple dbinit running concurrently
---
src/auditordb/versioning.sql | 7 ++++++-
src/exchangedb/versioning.sql | 7 ++++++-
src/include/taler_testing_lib.h | 4 ++--
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/auditordb/versioning.sql b/src/auditordb/versioning.sql
index 116f409b..c7fa8121 100644
--- a/src/auditordb/versioning.sql
+++ b/src/auditordb/versioning.sql
@@ -146,12 +146,17 @@
BEGIN;
+-- Added by Christian Grothoff to support concurrency, see
+--
https://stackoverflow.com/questions/29900845/create-schema-if-not-exists-raises-duplicate-key-error?rq=4
+LOCK TABLE pg_catalog.pg_namespace;
+
+
-- This file adds versioning support to database it will be loaded to.
-- It requires that PL/pgSQL is already loaded - will raise exception
otherwise.
-- All versioning "stuff" (tables, functions) is in "_v" schema.
-- All functions are defined as 'RETURNS SETOF INT4' to be able to make them
to RETURN literally nothing (0 rows).
--- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql
when calling.
+-- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql
when calling
CREATE SCHEMA IF NOT EXISTS _v;
COMMENT ON SCHEMA _v IS 'Schema for versioning data and functionality.';
diff --git a/src/exchangedb/versioning.sql b/src/exchangedb/versioning.sql
index 116f409b..c7fa8121 100644
--- a/src/exchangedb/versioning.sql
+++ b/src/exchangedb/versioning.sql
@@ -146,12 +146,17 @@
BEGIN;
+-- Added by Christian Grothoff to support concurrency, see
+--
https://stackoverflow.com/questions/29900845/create-schema-if-not-exists-raises-duplicate-key-error?rq=4
+LOCK TABLE pg_catalog.pg_namespace;
+
+
-- This file adds versioning support to database it will be loaded to.
-- It requires that PL/pgSQL is already loaded - will raise exception
otherwise.
-- All versioning "stuff" (tables, functions) is in "_v" schema.
-- All functions are defined as 'RETURNS SETOF INT4' to be able to make them
to RETURN literally nothing (0 rows).
--- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql
when calling.
+-- >> RETURNS VOID<< IS similar, but it still outputs "empty line" in psql
when calling
CREATE SCHEMA IF NOT EXISTS _v;
COMMENT ON SCHEMA _v IS 'Schema for versioning data and functionality.';
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index a514ad2d..367b54bb 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -275,12 +275,12 @@ struct TALER_TESTING_Command
*
* @param cls closure
* @param cmd command being run
- * @param i interpreter state
+ * @param is interpreter state
*/
void
(*run)(void *cls,
const struct TALER_TESTING_Command *cmd,
- struct TALER_TESTING_Interpreter *i);
+ struct TALER_TESTING_Interpreter *is);
/**
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: -fix issue with multiple dbinit running concurrently,
gnunet <=