diff --git a/role_scripts/13/standby/remote-replica.sh b/role_scripts/13/standby/remote-replica.sh index 93c522e..5a46fdb 100755 --- a/role_scripts/13/standby/remote-replica.sh +++ b/role_scripts/13/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS diff --git a/role_scripts/14/standby/remote-replica.sh b/role_scripts/14/standby/remote-replica.sh index 8841aec..cd68217 100755 --- a/role_scripts/14/standby/remote-replica.sh +++ b/role_scripts/14/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS diff --git a/role_scripts/15/standby/remote-replica.sh b/role_scripts/15/standby/remote-replica.sh index 8841aec..cd68217 100755 --- a/role_scripts/15/standby/remote-replica.sh +++ b/role_scripts/15/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS diff --git a/role_scripts/16/standby/remote-replica.sh b/role_scripts/16/standby/remote-replica.sh index 4ee0698..b1dacdf 100755 --- a/role_scripts/16/standby/remote-replica.sh +++ b/role_scripts/16/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS diff --git a/role_scripts/17/standby/remote-replica.sh b/role_scripts/17/standby/remote-replica.sh index 514fc6b..c9d00cd 100755 --- a/role_scripts/17/standby/remote-replica.sh +++ b/role_scripts/17/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS diff --git a/role_scripts/18/standby/remote-replica.sh b/role_scripts/18/standby/remote-replica.sh index 514fc6b..c9d00cd 100755 --- a/role_scripts/18/standby/remote-replica.sh +++ b/role_scripts/18/standby/remote-replica.sh @@ -82,6 +82,11 @@ fi # setup postgresql.conf touch /tmp/postgresql.conf + +if [[ "${TUNING_ENABLED:-}" == "true" ]]; then + echo "include_if_exists = '${TUNING_FILE_PATH:-/etc/config/pgtune.conf}'" >>/tmp/postgresql.conf +fi + echo "wal_level = replica" >>/tmp/postgresql.conf echo "shared_buffers = $SHARED_BUFFERS" >>/tmp/postgresql.conf echo "max_wal_senders = 90" >>/tmp/postgresql.conf # default is 10. value must be less than max_connections minus superuser_reserved_connections. ref: https://www.postgresql.org/docs/11/runtime-config-replication.html#GUC-MAX-WAL-SENDERS