diff options
author | Boss Marco <bossm8@bfh.ch> | 2022-05-12 22:44:40 +0200 |
---|---|---|
committer | Boss Marco <bossm8@bfh.ch> | 2022-05-12 22:44:40 +0200 |
commit | 16e0c5a88fac5f3e5f2a45e4d1771229f518f894 (patch) | |
tree | d0658f648f77cca1bb149a4b5b202373a45150f6 | |
parent | cd2b71b3769fe3b5f65060f1b876ced6aeeeae91 (diff) | |
download | grid5k-16e0c5a88fac5f3e5f2a45e4d1771229f518f894.tar.gz grid5k-16e0c5a88fac5f3e5f2a45e4d1771229f518f894.tar.bz2 grid5k-16e0c5a88fac5f3e5f2a45e4d1771229f518f894.zip |
logical replication implemented
-rw-r--r-- | configs/etc/taler/conf.d/auditor.conf | 2 | ||||
-rw-r--r-- | experiment/scripts/auditor.sh | 16 |
2 files changed, 6 insertions, 12 deletions
diff --git a/configs/etc/taler/conf.d/auditor.conf b/configs/etc/taler/conf.d/auditor.conf index 501d272..52a4ac8 100644 --- a/configs/etc/taler/conf.d/auditor.conf +++ b/configs/etc/taler/conf.d/auditor.conf @@ -9,6 +9,8 @@ DB = postgres SERVE = unix UNIXPATH = /var/run/taler/auditor-httpd/auditor.sock +TINY_AMOUNT = KUDOS:0.01 + [auditordb-postgres] CONFIG = postgresql:///auditor diff --git a/experiment/scripts/auditor.sh b/experiment/scripts/auditor.sh index d602214..32406d1 100644 --- a/experiment/scripts/auditor.sh +++ b/experiment/scripts/auditor.sh @@ -44,24 +44,14 @@ psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='auditor-ingress'" | \ psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='auditor'" | \ grep -q 1 || \ createuser auditor -psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='sync'" | \ - grep -q 1 || \ - createuser sync createdb -O auditor-ingress "exchange-ingress" createdb -O auditor "auditor" EOF su auditor-ingress << EOF -psql -d exchange-ingress -U auditor-ingress -tAc 'GRANT ALL ON ALL TABLES IN SCHEMA public TO sync;' +psql -d exchange-ingress -U auditor-ingress -tAc 'GRANT ALL ON ALL TABLES IN SCHEMA public TO auditor;' EOF - - # Only needed if we want to repicate this database again - # - #createdb -O sync exchange-production - #createdb -O auditor-wire libeufin - #psql -d exchange-prodution -U sync -tAc 'GRANT SELECT ON ALL TABLE IN SCHEMA public TO auditor;' - #psql -d libeufin -U auditor-wire -tAc 'GRANT SELECT ON ALL TABLE IN SCHEMA public TO auditor;' } function setup_exchange_replication() { @@ -81,7 +71,9 @@ function setup_exchange_replication() { DB_USER=egress wait_for_db su postgres << EOF - psql -d exchange-ingress -tAc "CREATE SUBSCRIPTION IF NOT EXISTS ${NODE_NAME} CONNECTION 'postgresql://egress:${DB_PASSWORD}@${DB_HOSTS}/${DB_NAME}' PUBLICATION exchange;" + psql -d exchange-ingress -tAc "ALTER SUBSCRIPTION ${NODE_NAME} DISABLE;" + psql -d exchange-ingress -tAc "ALTER SUBSCRIPTION ${NODE_NAME} SET (slot_name=NONE);" + psql -d exchange-ingress -tAc "CREATE SUBSCRIPTION ${NODE_NAME} CONNECTION 'postgresql://egress:${DB_PASSWORD}@${DB_HOSTS}/${DB_NAME}' PUBLICATION exchange;" || true EOF } |