change_recovery_conf_sample_v4.patch
application/octet-stream
Filename: change_recovery_conf_sample_v4.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
Series: patch v4
| File | + | − |
|---|---|---|
| doc/src/sgml/recovery-config.sgml | 5 | 0 |
| src/backend/access/transam/recovery.conf.sample | 9 | 0 |
| src/backend/access/transam/xlog.c | 6 | 0 |
*** a/doc/src/sgml/recovery-config.sgml
--- b/doc/src/sgml/recovery-config.sgml
***************
*** 272,277 **** restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
--- 272,282 ----
recovery target settings to a later target and restart to
continue recovery.
</para>
+ <para>
+ This setting has no effect if no recovery target is set.
+ <xref linkend="guc-hot-standby"> must be set to <literal>on</>
+ to enable <varname>pause_at_recovery_target</>.
+ </para>
</listitem>
</varlistentry>
*** a/src/backend/access/transam/recovery.conf.sample
--- b/src/backend/access/transam/recovery.conf.sample
***************
*** 87,92 ****
--- 87,101 ----
#
#recovery_target_timeline = 'latest'
#
+ #
+ # If pause_at_recovery_target is enabled, recovery will pause when
+ # the recovery target is reached. The pause state will continue until
+ # pg_xlog_replay_resume() is called. This setting has no effect if
+ # no recovery target is set. Hot standby must be enabled to enable
+ # pause_at_recovery_target.
+ #
+ #pause_at_recovery_target = true
+ #
#---------------------------------------------------------------------------
# STANDBY SERVER PARAMETERS
#---------------------------------------------------------------------------
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 5369,5374 **** readRecoveryCommandFile(void)
--- 5369,5380 ----
RECOVERY_COMMAND_FILE)));
}
+ if (!EnableHotStandby && recoveryPauseAtTarget &&
+ recoveryTarget != RECOVERY_TARGET_UNSET)
+ ereport(FATAL,
+ (errmsg("hot standby must be enabled to pause recovery"),
+ errhint("Either turn on hot_standby, turn off pause_at_recovery_target, or unset the recovery target.")));
+
/* Enable fetching from archive recovery area */
InArchiveRecovery = true;