From 34fc61673829f0cb63811fb63cc3c510fc2aadfc Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 2 May 2017 11:12:30 +0200 Subject: [PATCH] Change hot_standby default value to 'on' This goes together with the changes made to enable replication on the sending side by default (wal_level, max_wal_senders etc) by making the receiving stadby node also enable it by default. Huong Dangminh --- doc/src/sgml/config.sgml | 2 +- doc/src/sgml/high-availability.sgml | 4 ++-- src/backend/utils/misc/guc.c | 2 +- src/backend/utils/misc/postgresql.conf.sample | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e02b0c80df0..0b9e3002fb6 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3227,7 +3227,7 @@ ANY num_sync ( . - The default value is off. + The default value is on. This parameter can only be set at server start. It only has effect during archive recovery or in standby mode. diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 9e2be5f67ca..22ac10f4284 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -2057,8 +2057,8 @@ if (!triggered) Administrator's Overview - If hot_standby is turned on in - postgresql.conf and there is a recovery.conf + If hot_standby is on in postgresql.conf + (the default value) and there is a recovery.conf file present, the server will run in Hot Standby mode. However, it may take some time for Hot Standby connections to be allowed, because the server will not accept connections until it has completed diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index a414fb2c767..587fbce147f 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1571,7 +1571,7 @@ static struct config_bool ConfigureNamesBool[] = NULL }, &EnableHotStandby, - false, + true, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index c02f7f36456..fceef14c78a 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -254,7 +254,7 @@ # These settings are ignored on a master server. -#hot_standby = off # "on" allows queries during recovery +#hot_standby = on # "off" disallows queries during recovery # (change requires restart) #max_standby_archive_delay = 30s # max delay before canceling queries # when reading WAL from archive; -- 2.30.2