pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow restore_command parameter to be changed with reload.
Date: Wed, 02 Dec 2020 02:00:55 +0000
Message-ID: <E1kkHRv-0006qa-GD@gemulon.postgresql.org> (raw)

Allow restore_command parameter to be changed with reload.

This commit changes restore_command from PGC_POSTMASTER to PGC_SIGHUP.

As the side effect of this commit, restore_command can be reset to
empty during archive recovery. In this setting, archive recovery
tries to replay only WAL files available in pg_wal directory. This is
the same behavior as when the command that always fails is specified
in restore_command.

Note that restore_command still must be specified (not empty) when
starting archive recovery, even after applying this commit. This is
necessary as the safeguard to prevent users from forgetting to
specify restore_command and starting archive recovery.

Thanks to Peter Eisentraut, Michael Paquier, Andres Freund,
Robert Haas and Anastasia Lubennikova for discussion.

Author: Sergei Kornilov
Reviewed-by: Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/2317771549527294@sas2-985f744271ca.qloud-c.yandex.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/942305a36365433eff3c1937945758f2dbf1662b

Modified Files
--------------
doc/src/sgml/config.sgml                      | 3 ++-
src/backend/utils/misc/guc.c                  | 2 +-
src/backend/utils/misc/postgresql.conf.sample | 1 -
3 files changed, 3 insertions(+), 3 deletions(-)



Message-ID: <E1kkHRv-0006qa-GD@gemulon.postgresql.org>
Permalink:  ../E1kkHRv-0006qa-GD@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kkHRv-0006qa-GD@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Allow restore_command parameter to be changed with reload.
  In-Reply-To: <E1kkHRv-0006qa-GD@gemulon.postgresql.org>
  References: <E1kkHRv-0006qa-GD@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox