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

Commit167bd48

Browse files
committed
Make standby promotion reset the recovery pause state to 'not paused'.
If a promotion is triggered while recovery is paused, the paused state endsand promotion continues. But previously in that casepg_get_wal_replay_pause_state() returned 'paused' wrongly while a promotionwas ongoing.This commit changes a standby promotion so that it marks the recoverypause state as 'not paused' when it's triggered, to fix the issue.Author: Fujii MasaoReviewed-by: Dilip Kumar, Kyotaro HoriguchiDiscussion:https://postgr.es/m/f706876c-4894-0ba5-6f4d-79803eeea21b@oss.nttdata.com
1 parent0a442a4 commit167bd48

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12825,6 +12825,14 @@ SetPromoteIsTriggered(void)
1282512825
XLogCtl->SharedPromoteIsTriggered= true;
1282612826
SpinLockRelease(&XLogCtl->info_lck);
1282712827

12828+
/*
12829+
* Mark the recovery pause state as 'not paused' because the paused state
12830+
* ends and promotion continues if a promotion is triggered while recovery
12831+
* is paused. Otherwise pg_get_wal_replay_pause_state() can mistakenly
12832+
* return 'paused' while a promotion is ongoing.
12833+
*/
12834+
SetRecoveryPause(false);
12835+
1282812836
LocalPromoteIsTriggered= true;
1282912837
}
1283012838

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp