From cd4329d9393f84dce34f0bd2dd936adc8ffaa213 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Tue, 29 Nov 2022 11:28:08 +1300 Subject: Remove promote_trigger_file. Previously, an idle startup (recovery) process would wake up every 5 seconds to have a chance to poll for promote_trigger_file, even if that GUC was not configured. That promotion triggering mechanism was effectively superseded by pg_ctl promote and pg_promote() a long time ago. There probably aren't many users left and it's very easy to change to the modern mechanisms, so we agreed to remove the feature. This is part of a campaign to reduce wakeups on idle systems. Author: Simon Riggs Reviewed-by: Bharath Rupireddy Reviewed-by: Robert Haas Reviewed-by: Thomas Munro Reviewed-by: Tom Lane Reviewed-by: Ian Lawrence Barwick Discussion: https://postgr.es/m/CANbhV-FsjnzVOQGBpQ589%3DnWuL1Ex0Ykn74Nh1hEjp2usZSR5g%40mail.gmail.com --- .../sgml/appendix-obsolete-recovery-config.sgml | 13 +++++-------- doc/src/sgml/config.sgml | 18 ------------------ doc/src/sgml/high-availability.sgml | 22 ++++++++-------------- 3 files changed, 13 insertions(+), 40 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/appendix-obsolete-recovery-config.sgml b/doc/src/sgml/appendix-obsolete-recovery-config.sgml index 1cf4913114..a57084ad43 100644 --- a/doc/src/sgml/appendix-obsolete-recovery-config.sgml +++ b/doc/src/sgml/appendix-obsolete-recovery-config.sgml @@ -34,14 +34,11 @@ - The - trigger_file - - trigger_file - promote_trigger_file - - setting has been renamed to - . + PostgreSQL 15 and below had a setting + promote_trigger_file, or + trigger_file before 12. + Use pg_ctl promote or call + pg_promote() to promote a standby instead. diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 9fd2075b1e..82df89b1a9 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4610,24 +4610,6 @@ ANY num_sync ( - promote_trigger_file (string) - - promote_trigger_file configuration parameter - - - - - Specifies a trigger file whose presence ends recovery in the - standby. Even if this value is not set, you can still promote - the standby using pg_ctl promote or calling - pg_promote(). - This parameter can only be set in the postgresql.conf - file or on the server command line. - - - - hot_standby (boolean) diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index b2b3129397..f180607528 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -653,11 +653,10 @@ protocol to make nodes agree on a serializable transactional order. Standby mode is exited and the server switches to normal operation - when pg_ctl promote is run, - pg_promote() is called, or a trigger file is found - (promote_trigger_file). Before failover, - any WAL immediately available in the archive or in pg_wal will be - restored, but no attempt is made to connect to the primary. + when pg_ctl promote is run, or + pg_promote() is called. Before failover, + any WAL immediately available in the archive or in pg_wal + will be restored, but no attempt is made to connect to the primary. @@ -1483,15 +1482,10 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)' To trigger failover of a log-shipping standby server, run - pg_ctl promote, call pg_promote(), - or create a trigger file with the file name and path specified by the - promote_trigger_file. If you're planning to use - pg_ctl promote or to call - pg_promote() to fail over, - promote_trigger_file is not required. If you're - setting up the reporting servers that are only used to offload read-only - queries from the primary, not for high availability purposes, you don't - need to promote it. + pg_ctl promote or call pg_promote(). + If you're setting up reporting servers that are only used to offload + read-only queries from the primary, not for high availability purposes, + you don't need to promote. -- cgit v1.2.3