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

Commit3aefff4

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 parent425bef6 commit3aefff4

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
@@ -5574,11 +5574,6 @@ StartupXLOG(void)
55745574
*/
55755575
if (recoveryStopsHere(record,&recoveryApply))
55765576
{
5577-
if (recoveryPauseAtTarget)
5578-
{
5579-
SetRecoveryPause(true);
5580-
recoveryPausesHere();
5581-
}
55825577
reachedStopPoint= true;/* see below */
55835578
recoveryContinue= false;
55845579

@@ -5709,6 +5704,12 @@ StartupXLOG(void)
57095704
* end of main redo apply loop
57105705
*/
57115706

5707+
if (recoveryPauseAtTarget&&reachedStopPoint)
5708+
{
5709+
SetRecoveryPause(true);
5710+
recoveryPausesHere();
5711+
}
5712+
57125713
ereport(LOG,
57135714
(errmsg("redo done at %X/%X",
57145715
(uint32) (ReadRecPtr >>32), (uint32)ReadRecPtr)));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp