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

Commit3739e5a

Browse files
committed
Fix pause_at_recovery_target + recovery_target_inclusive combination.
If pause_at_recovery_target is set, recovery pauses *before* applying thetarget record, even if recovery_target_inclusive is set. If you thencontinue with pg_xlog_replay_resume(), it will apply the target recordbefore ending recovery. In other words, if you log in while it's pausedand verify that the database looks OK, ending recovery changes its stateagain, possibly destroying data that you were tring to salvage with PITR.Backpatch to 9.1, this has been broken since pause_at_recovery_target wasadded.
1 parent815d71d commit3739e5a

File tree

1 file changed

+6
-5
lines changed
  • src/backend/access/transam

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6794,11 +6794,6 @@ StartupXLOG(void)
67946794
*/
67956795
if (recoveryStopsHere(record,&recoveryApply,&recoveryDelay))
67966796
{
6797-
if (recoveryPauseAtTarget)
6798-
{
6799-
SetRecoveryPause(true);
6800-
recoveryPausesHere();
6801-
}
68026797
reachedStopPoint= true;/* see below */
68036798
recoveryContinue= false;
68046799

@@ -6948,6 +6943,12 @@ StartupXLOG(void)
69486943
* end of main redo apply loop
69496944
*/
69506945

6946+
if (recoveryPauseAtTarget&&reachedStopPoint)
6947+
{
6948+
SetRecoveryPause(true);
6949+
recoveryPausesHere();
6950+
}
6951+
69516952
ereport(LOG,
69526953
(errmsg("redo done at %X/%X",
69536954
(uint32) (ReadRecPtr >>32), (uint32)ReadRecPtr)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp