From d6d9d57ff81f42f5daf7adcbf1ca61cc21d00c1a Mon Sep 17 00:00:00 2001 From: KIMURA Kazunori Date: Thu, 15 Jan 2026 11:21:28 +0900 Subject: [PATCH 1/2] chore: change value for "wal_level" on hot standby "hot_standby" and "archive" are mapped to "replica" See https://www.postgresql.org/docs/10/runtime-config-wal.html#GUC-WAL-LEVEL > In releases prior to 9.6, this parameter also allowed the values > archive and hot_standby. > These are still accepted but mapped to replica. --- runtime/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/functions b/runtime/functions index a9be034..bba31bc 100755 --- a/runtime/functions +++ b/runtime/functions @@ -145,7 +145,7 @@ configure_hot_standby() { slave|snapshot|backup) ;; *) echo "Configuring hot standby..." - set_postgresql_param "wal_level" "hot_standby" + set_postgresql_param "wal_level" "replica" set_postgresql_param "max_wal_senders" "16" set_postgresql_param "checkpoint_segments" "8" set_postgresql_param "wal_keep_segments" "32" From 30e21b55cbffd72af593786e688e0a970668381f Mon Sep 17 00:00:00 2001 From: KIMURA Kazunori Date: Tue, 20 Jan 2026 19:35:51 +0900 Subject: [PATCH 2/2] Delete checkpoint_segments setting on hot standby Upstream change on 9.6 https://github.com/postgres/postgres/commit/8f2977b3ec2fbb98ee36045d4e2be81ca4c293e0 > max_wal_size = (3 * checkpoint_segments) * 16MB > Note that the default setting for max_wal_size is > much higher than the default checkpoint_segments used > to be, so setting this might no longer necessary. --- runtime/functions | 1 - 1 file changed, 1 deletion(-) diff --git a/runtime/functions b/runtime/functions index bba31bc..575c045 100755 --- a/runtime/functions +++ b/runtime/functions @@ -147,7 +147,6 @@ configure_hot_standby() { echo "Configuring hot standby..." set_postgresql_param "wal_level" "replica" set_postgresql_param "max_wal_senders" "16" - set_postgresql_param "checkpoint_segments" "8" set_postgresql_param "wal_keep_segments" "32" set_postgresql_param "hot_standby" "on" ;;