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

Commit13b89f9

Browse files
committed
Allow some recovery parameters to be changed with reload
Changearchive_cleanup_commandpromote_trigger_filerecovery_end_commandrecovery_min_apply_delayfrom PGC_POSTMASTER to PGC_SIGHUP. This did not require any furtherchanges.Reviewed-by: Michael Paquier <michael@paquier.xyz>Discussion:https://www.postgresql.org/message-id/flat/ca28011a-cfaa-565c-d622-c1907c33ecf7%402ndquadrant.com
1 parentcd5afd8 commit13b89f9

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,8 +3081,7 @@ include_dir 'conf.d'
30813081
<para>
30823082
This section describes the settings that apply only for the duration of
30833083
the recovery. They must be reset for any subsequent recovery you wish to
3084-
perform. They can only be set at server start and cannot be changed once
3085-
recovery has begun.
3084+
perform.
30863085
</para>
30873086

30883087
<para>
@@ -3161,6 +3160,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
31613160
database server shutdown) or an error by the shell (such as command
31623161
not found), then recovery will abort and the server will not start up.
31633162
</para>
3163+
3164+
<para>
3165+
This parameter can only be set at server start.
3166+
</para>
31643167
</listitem>
31653168
</varlistentry>
31663169

@@ -3202,6 +3205,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
32023205
terminated by a signal or an error by the shell (such as command not
32033206
found), a fatal error will be raised.
32043207
</para>
3208+
<para>
3209+
This parameter can only be set in the <filename>postgresql.conf</filename>
3210+
file or on the server command line.
3211+
</para>
32053212
</listitem>
32063213
</varlistentry>
32073214

@@ -3227,6 +3234,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
32273234
signal or an error by the shell (such as command not found), the
32283235
database will not proceed with startup.
32293236
</para>
3237+
<para>
3238+
This parameter can only be set in the <filename>postgresql.conf</filename>
3239+
file or on the server command line.
3240+
</para>
32303241
</listitem>
32313242
</varlistentry>
32323243

@@ -3863,7 +3874,8 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
38633874
standby. Even if this value is not set, you can still promote
38643875
the standby using <command>pg_ctl promote</command> or calling
38653876
<function>pg_promote</function>.
3866-
This parameter can only be set at server start.
3877+
This parameter can only be set in the <filename>postgresql.conf</filename>
3878+
file or on the server command line.
38673879
</para>
38683880
</listitem>
38693881
</varlistentry>
@@ -4117,7 +4129,8 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
41174129
</warning>
41184130
</para>
41194131
<para>
4120-
This parameter can only be set at server start.
4132+
This parameter can only be set in the <filename>postgresql.conf</filename>
4133+
file or on the server command line.
41214134
</para>
41224135
</listitem>
41234136
</varlistentry>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ static struct config_int ConfigureNamesInt[] =
20472047
},
20482048

20492049
{
2050-
{"recovery_min_apply_delay",PGC_POSTMASTER,REPLICATION_STANDBY,
2050+
{"recovery_min_apply_delay",PGC_SIGHUP,REPLICATION_STANDBY,
20512051
gettext_noop("Sets the minimum delay for applying changes during recovery."),
20522052
NULL,
20532053
GUC_UNIT_MS
@@ -3398,7 +3398,7 @@ static struct config_string ConfigureNamesString[] =
33983398
},
33993399

34003400
{
3401-
{"archive_cleanup_command",PGC_POSTMASTER,WAL_ARCHIVE_RECOVERY,
3401+
{"archive_cleanup_command",PGC_SIGHUP,WAL_ARCHIVE_RECOVERY,
34023402
gettext_noop("Sets the shell command that will be executed at every restart point."),
34033403
NULL
34043404
},
@@ -3408,7 +3408,7 @@ static struct config_string ConfigureNamesString[] =
34083408
},
34093409

34103410
{
3411-
{"recovery_end_command",PGC_POSTMASTER,WAL_ARCHIVE_RECOVERY,
3411+
{"recovery_end_command",PGC_SIGHUP,WAL_ARCHIVE_RECOVERY,
34123412
gettext_noop("Sets the shell command that will be executed once at the end of recovery."),
34133413
NULL
34143414
},
@@ -3474,7 +3474,7 @@ static struct config_string ConfigureNamesString[] =
34743474
},
34753475

34763476
{
3477-
{"promote_trigger_file",PGC_POSTMASTER,REPLICATION_STANDBY,
3477+
{"promote_trigger_file",PGC_SIGHUP,REPLICATION_STANDBY,
34783478
gettext_noop("Specifies a file name whose presence ends recovery in the standby."),
34793479
NULL
34803480
},

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@
244244
# e.g. 'cp /mnt/server/archivedir/%f %p'
245245
# (change requires restart)
246246
#archive_cleanup_command = ''# command to execute at every restartpoint
247-
# (change requires restart)
248247
#recovery_end_command = ''# command to execute at completion of recovery
249-
# (change requires restart)
250248

251249
# - Recovery Target -
252250

@@ -310,7 +308,6 @@
310308
#primary_slot_name = ''# replication slot on sending server
311309
# (change requires restart)
312310
#promote_trigger_file = ''# file name whose presence ends recovery
313-
# (change requires restart)
314311
#hot_standby = on# "off" disallows queries during recovery
315312
# (change requires restart)
316313
#max_standby_archive_delay = 30s# max delay before canceling queries
@@ -329,7 +326,6 @@
329326
#wal_retrieve_retry_interval = 5s# time to wait before retrying to
330327
# retrieve WAL after a failed attempt
331328
#recovery_min_apply_delay = 0# minimum delay for applying changes during recovery
332-
# (change requires restart)
333329

334330
# - Subscribers -
335331

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp