diff options
Diffstat (limited to 'experiment/scripts/database.sh')
-rwxr-xr-x | experiment/scripts/database.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh index 8a22bb7..3398a9a 100755 --- a/experiment/scripts/database.sh +++ b/experiment/scripts/database.sh @@ -229,7 +229,9 @@ function setup_config() { " > ${PG_CONF}/exchange.conf # Must be done here otherwise pg does not start a second time - if [[ ${NUM_AUDITORS} -gt 0 ]]; then + if [[ ${NUM_AUDITORS} -ge 1 ]] && \ + [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]]; + then echo "wal_level=logical" >> ${PG_CONF}/exchange.conf fi @@ -259,7 +261,9 @@ function setup_pgbouncer() { # Enable replication to the auditor - is only done when an auditor node is present function setup_replication() { - if [[ "${NUM_AUDITORS}" -gt 0 ]]; then + if [[ "${NUM_AUDITORS}" -ge 1 ]] && \ + [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]]; + then su postgres << EOF createuser --replication egress psql -tAc "ALTER ROLE egress WITH PASSWORD '${DB_PASSWORD}';" || true |