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

Commit815d71d

Browse files
committed
If multiple recovery_targets are specified, use the latest one.
The docs say that only one of recovery_target_xid, recovery_target_time, orrecovery_target_name can be specified. But the code actually did somethingdifferent, so that a name overrode time, and xid overrode both time and name.Now the target specified last takes effect, whether it's an xid, time orname.With this patch, we still accept multiple recovery_target settings, eventhough docs say that only one can be specified. It's a general property ofthe recovery.conf file parser that you if you specify the same option twice,the last one takes effect, like with postgresql.conf.
1 parent847e46a commit815d71d

File tree

1 file changed

+0
-13
lines changed
  • src/backend/access/transam

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5402,13 +5402,6 @@ readRecoveryCommandFile(void)
54025402
}
54035403
elseif (strcmp(item->name,"recovery_target_time")==0)
54045404
{
5405-
/*
5406-
* if recovery_target_xid or recovery_target_name specified, then
5407-
* this overrides recovery_target_time
5408-
*/
5409-
if (recoveryTarget==RECOVERY_TARGET_XID||
5410-
recoveryTarget==RECOVERY_TARGET_NAME)
5411-
continue;
54125405
recoveryTarget=RECOVERY_TARGET_TIME;
54135406

54145407
/*
@@ -5425,12 +5418,6 @@ readRecoveryCommandFile(void)
54255418
}
54265419
elseif (strcmp(item->name,"recovery_target_name")==0)
54275420
{
5428-
/*
5429-
* if recovery_target_xid specified, then this overrides
5430-
* recovery_target_name
5431-
*/
5432-
if (recoveryTarget==RECOVERY_TARGET_XID)
5433-
continue;
54345421
recoveryTarget=RECOVERY_TARGET_NAME;
54355422

54365423
recoveryTargetName=pstrdup(item->value);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp