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

Commit0d0b2bf

Browse files
committed
Rename min_recovery_apply_delay to recovery_min_apply_delay.
Per discussion, this seems like a more consistent choice of name.Fabrízio de Royes Mello, after a suggestion by Peter Eisentraut;some additional documentation wordsmithing by me
1 parentf825c7c commit0d0b2bf

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

‎doc/src/sgml/recovery-config.sgml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,15 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
403403
</listitem>
404404
</varlistentry>
405405

406-
<varlistentry id="min-recovery-apply-delay" xreflabel="min_recovery_apply_delay">
407-
<term><varname>min_recovery_apply_delay</varname> (<type>integer</type>)
406+
<varlistentry id="recovery-min-apply-delay" xreflabel="recovery_min_apply_delay">
407+
<term><varname>recovery_min_apply_delay</varname> (<type>integer</type>)
408408
<indexterm>
409-
<primary><varname>min_recovery_apply_delay</> recovery parameter</primary>
409+
<primary><varname>recovery_min_apply_delay</> recovery parameter</primary>
410410
</indexterm>
411411
</term>
412412
<listitem>
413413
<para>
414-
By default, a standby serverkeeps restoring WAL records from the
414+
By default, a standby serverrestores WAL records from the
415415
primary as soon as possible. It may be useful to have a time-delayed
416416
copy of the data, offering various options to correct data loss errors.
417417
This parameter allows you to delay recovery by a fixed period of time,
@@ -428,15 +428,15 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
428428
in transfer because of networks or cascading replication configurations
429429
may reduce the actual wait time significantly. If the system
430430
clocks on master and standby are not synchronised, this may lead to
431-
recovery applying records earlier than expected but is not a major issue
432-
because theuseful settings of the parameter are much larger than
433-
typical timedeviation between the servers. Be careful to allow for
431+
recovery applying records earlier than expected; butthatis not a
432+
major issue becauseuseful settings of the parameter are much larger
433+
thantypical timedeviations between servers. Be careful to allow for
434434
different timezone settings on master and standby.
435435
</para>
436436
<para>
437437
The delay occurs only on WAL records for COMMIT and Restore Points.
438438
Other records may be replayed earlier than the specified delay, which
439-
is not an issue for MVCC though may potentially increase the number
439+
is not an issue for MVCC thoughitmay potentially increase the number
440440
of recovery conflicts generated.
441441
</para>
442442
<para>

‎doc/src/sgml/release-9.4.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,10 @@
775775

776776
<listitem>
777777
<para>
778-
Allow <link
778+
Add <link
779779
linkend="recovery-config"><filename>recovery.conf</></link>
780780
parameter <link
781-
linkend="min-recovery-apply-delay"><varname>min_recovery_apply_delay</></link>
781+
linkend="recovery-min-apply-delay"><varname>recovery_min_apply_delay</></link>
782782
to force delayed replication (Robert Haas, Fabr&iacute;zio de
783783
Royes Mello, Simon Riggs)
784784
</para>

‎src/backend/access/transam/recovery.conf.sample

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,20 @@
129129
#
130130
# By default, a standby server keeps restoring XLOG records from the
131131
# primary indefinitely. If you want to stop the standby mode, finish recovery
132-
# and open the system in read/write mode, specify path to a trigger file.
132+
# and open the system in read/write mode, specifyapath to a trigger file.
133133
# The server will poll the trigger file path periodically and start as a
134134
# primary server when it's found.
135135
#
136136
#trigger_file = ''
137137
#
138-
# By default, a standby serverkeeps restoringXLOG records from the
139-
#primary assoon as possible. If you want to explicitly delay the replay of
140-
#committedtransactions from the master, specify arecovery apply delay.
141-
#For example,if you set this parameter to 5min, the standby will replay
142-
#each transactioncommit only when the system time on the standby is at
143-
#least five minutespast the commit time reported by the master.
138+
# By default, a standby serverrestoresXLOG records from the primary as
139+
# soon as possible. If you want to explicitly delay the replay of committed
140+
# transactions from the master, specify aminimum apply delay. For example,
141+
# if you set this parameter to 5min, the standby will replay each transaction
142+
# commit only when the system time on the standby is at least five minutes
143+
# past the commit time reported by the master.
144144
#
145-
#min_recovery_apply_delay = 0
145+
#recovery_min_apply_delay = 0
146146
#
147147
#---------------------------------------------------------------------------
148148
# HOT STANDBY PARAMETERS

‎src/backend/access/transam/xlog.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static bool recoveryPauseAtTarget = true;
223223
staticTransactionIdrecoveryTargetXid;
224224
staticTimestampTzrecoveryTargetTime;
225225
staticchar*recoveryTargetName;
226-
staticintmin_recovery_apply_delay=0;
226+
staticintrecovery_min_apply_delay=0;
227227
staticTimestampTzrecoveryDelayUntilTime;
228228

229229
/* options taken from recovery.conf for XLOG streaming */
@@ -5236,18 +5236,19 @@ readRecoveryCommandFile(void)
52365236
(errmsg_internal("trigger_file = '%s'",
52375237
TriggerFile)));
52385238
}
5239-
elseif (strcmp(item->name,"min_recovery_apply_delay")==0)
5239+
elseif (strcmp(item->name,"recovery_min_apply_delay")==0)
52405240
{
52415241
constchar*hintmsg;
52425242

5243-
if (!parse_int(item->value,&min_recovery_apply_delay,GUC_UNIT_MS,
5243+
if (!parse_int(item->value,&recovery_min_apply_delay,GUC_UNIT_MS,
52445244
&hintmsg))
52455245
ereport(ERROR,
52465246
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5247-
errmsg("parameter \"%s\" requires a temporal value","min_recovery_apply_delay"),
5247+
errmsg("parameter \"%s\" requires a temporal value",
5248+
"recovery_min_apply_delay"),
52485249
hintmsg ?errhint("%s",_(hintmsg)) :0));
52495250
ereport(DEBUG2,
5250-
(errmsg("min_recovery_apply_delay = '%s'",item->value)));
5251+
(errmsg("recovery_min_apply_delay = '%s'",item->value)));
52515252
}
52525253
else
52535254
ereport(FATAL,
@@ -5669,7 +5670,7 @@ SetRecoveryPause(bool recoveryPause)
56695670
}
56705671

56715672
/*
5672-
* Whenmin_recovery_apply_delay is set, we wait long enough to make sure
5673+
* Whenrecovery_min_apply_delay is set, we wait long enough to make sure
56735674
* certain record types are applied at least that interval behind the master.
56745675
*
56755676
* Returns true if we waited.
@@ -5690,7 +5691,7 @@ recoveryApplyDelay(XLogRecord *record)
56905691
intmicrosecs;
56915692

56925693
/* nothing to do if no delay configured */
5693-
if (min_recovery_apply_delay==0)
5694+
if (recovery_min_apply_delay==0)
56945695
return false;
56955696

56965697
/*
@@ -5711,7 +5712,7 @@ recoveryApplyDelay(XLogRecord *record)
57115712
return false;
57125713

57135714
recoveryDelayUntilTime=
5714-
TimestampTzPlusMilliseconds(xtime,min_recovery_apply_delay);
5715+
TimestampTzPlusMilliseconds(xtime,recovery_min_apply_delay);
57155716

57165717
/*
57175718
* Exit without arming the latch if it's already past time to apply this

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp