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

Commit3595a71

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 parent9af34cd commit3595a71

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
@@ -397,6 +397,7 @@ SyncRepReleaseWaiters(void)
397397
volatileWalSnd*walsnd=&walsndctl->walsnds[i];
398398

399399
if (walsnd->pid!=0&&
400+
walsnd->state==WALSNDSTATE_STREAMING&&
400401
walsnd->sync_standby_priority>0&&
401402
(priority==0||
402403
priority>walsnd->sync_standby_priority))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp