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

Commit580b941

Browse files
committed
Prevent non-streaming replication connections from being selected sync slave
This prevents a pg_basebackup backup session that just does a basebackup (no xlog involved at all) from becoming the synchronous slaveand thus blocking all access while it runs.Also fixes the problem when a higher priority slave shows up it wouldbecome the sync standby before it has reached the STREAMING state, bymaking sure we can only switch to a walsender that's actually STREAMING.Fujii Masao
1 parent557433f commit580b941

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/backend/replication/syncrep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ SyncRepReleaseWaiters(void)
399399
volatileWalSnd*walsnd=&walsndctl->walsnds[i];
400400

401401
if (walsnd->pid!=0&&
402+
walsnd->state==WALSNDSTATE_STREAMING&&
402403
walsnd->sync_standby_priority>0&&
403404
(priority==0||
404405
priority>walsnd->sync_standby_priority))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp