diff --git a/role_scripts/17/primary/start.sh b/role_scripts/17/primary/start.sh index 783406a..153e667 100755 --- a/role_scripts/17/primary/start.sh +++ b/role_scripts/17/primary/start.sh @@ -43,6 +43,11 @@ if [[ "${WAL_BACKUP_TYPE:-0}" == "WALG" ]]; then else echo "archive_command = '/bin/true'" >>/tmp/postgresql.conf fi +# WAL summaries let pg_basebackup --incremental send only the blocks changed since the parent +# backup. Standbys summarize the WAL they replay too, so a promoted standby can keep the chain. +if [[ "${SUMMARIZE_WAL:-off}" == "on" ]]; then + echo "summarize_wal = on" >>/tmp/postgresql.conf +fi PRELOAD="pg_stat_statements" if [[ "${TDE_ENABLED:-false}" == "true" ]]; then diff --git a/role_scripts/17/standby/run.sh b/role_scripts/17/standby/run.sh index 8e518e4..77cc372 100755 --- a/role_scripts/17/standby/run.sh +++ b/role_scripts/17/standby/run.sh @@ -160,6 +160,11 @@ if [[ "${WAL_BACKUP_TYPE:-0}" == "WALG" ]]; then else echo "archive_command = '/bin/true'" >>/tmp/postgresql.conf fi +# WAL summaries let pg_basebackup --incremental send only the blocks changed since the parent +# backup. Standbys summarize the WAL they replay too, so a promoted standby can keep the chain. +if [[ "${SUMMARIZE_WAL:-off}" == "on" ]]; then + echo "summarize_wal = on" >>/tmp/postgresql.conf +fi PRELOAD="pg_stat_statements" if [[ "${TDE_ENABLED:-false}" == "true" ]]; then diff --git a/role_scripts/18/primary/start.sh b/role_scripts/18/primary/start.sh index ab734d6..ae9ceeb 100755 --- a/role_scripts/18/primary/start.sh +++ b/role_scripts/18/primary/start.sh @@ -43,6 +43,11 @@ if [[ "${WAL_BACKUP_TYPE:-0}" == "WALG" ]]; then else echo "archive_command = '/bin/true'" >>/tmp/postgresql.conf fi +# WAL summaries let pg_basebackup --incremental send only the blocks changed since the parent +# backup. Standbys summarize the WAL they replay too, so a promoted standby can keep the chain. +if [[ "${SUMMARIZE_WAL:-off}" == "on" ]]; then + echo "summarize_wal = on" >>/tmp/postgresql.conf +fi PRELOAD="pg_stat_statements" if [[ "${TDE_ENABLED:-false}" == "true" ]]; then diff --git a/role_scripts/18/standby/run.sh b/role_scripts/18/standby/run.sh index 8e518e4..77cc372 100755 --- a/role_scripts/18/standby/run.sh +++ b/role_scripts/18/standby/run.sh @@ -160,6 +160,11 @@ if [[ "${WAL_BACKUP_TYPE:-0}" == "WALG" ]]; then else echo "archive_command = '/bin/true'" >>/tmp/postgresql.conf fi +# WAL summaries let pg_basebackup --incremental send only the blocks changed since the parent +# backup. Standbys summarize the WAL they replay too, so a promoted standby can keep the chain. +if [[ "${SUMMARIZE_WAL:-off}" == "on" ]]; then + echo "summarize_wal = on" >>/tmp/postgresql.conf +fi PRELOAD="pg_stat_statements" if [[ "${TDE_ENABLED:-false}" == "true" ]]; then