Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit942305a

Browse files
committed
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 toempty during archive recovery. In this setting, archive recoverytries to replay only WAL files available in pg_wal directory. This isthe same behavior as when the command that always fails is specifiedin restore_command.Note that restore_command still must be specified (not empty) whenstarting archive recovery, even after applying this commit. This isnecessary as the safeguard to prevent users from forgetting tospecify restore_command and starting archive recovery.Thanks to Peter Eisentraut, Michael Paquier, Andres Freund,Robert Haas and Anastasia Lubennikova for discussion.Author: Sergei KornilovReviewed-by: Kyotaro Horiguchi, Fujii MasaoDiscussion:https://postgr.es/m/2317771549527294@sas2-985f744271ca.qloud-c.yandex.net
1 parent87ae969 commit942305a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3567,7 +3567,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
35673567
</para>
35683568

35693569
<para>
3570-
This parameter can only be set at server start.
3570+
This parameter can only be set in the <filename>postgresql.conf</filename>
3571+
file or on the server command line.
35713572
</para>
35723573
</listitem>
35733574
</varlistentry>

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3699,7 +3699,7 @@ static struct config_string ConfigureNamesString[] =
36993699
},
37003700

37013701
{
3702-
{"restore_command",PGC_POSTMASTER,WAL_ARCHIVE_RECOVERY,
3702+
{"restore_command",PGC_SIGHUP,WAL_ARCHIVE_RECOVERY,
37033703
gettext_noop("Sets the shell command that will be called to retrieve an archived WAL file."),
37043704
NULL
37053705
},

‎src/backend/utils/misc/postgresql.conf.sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@
253253
# placeholders: %p = path of file to restore
254254
# %f = file name only
255255
# e.g. 'cp /mnt/server/archivedir/%f %p'
256-
# (change requires restart)
257256
#archive_cleanup_command = ''# command to execute at every restartpoint
258257
#recovery_end_command = ''# command to execute at completion of recovery
259258

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp