Prevent non-streaming replication connections from being selected sync slave

Magnus Hagander <magnus@hagander.net>

Commit: 3595a71e9ce90a2d4c812a9bb34dc24ffc492c2b
Author: Magnus Hagander <magnus@hagander.net>
Date: 2012-06-11T13:17:38Z
Releases: 9.2.0
Prevent non-streaming replication connections from being selected sync slave

This prevents a pg_basebackup backup session that just does a base
backup (no xlog involved at all) from becoming the synchronous slave
and thus blocking all access while it runs.

Also fixes the problem when a higher priority slave shows up it would
become the sync standby before it has reached the STREAMING state, by
making sure we can only switch to a walsender that's actually STREAMING.

Fujii Masao

Files

PathChange+/−
src/backend/replication/syncrep.c modified +1 −0