pgsql: Fix bug in clean shutdown of walsender that pg_receiving is conn - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Fix bug in clean shutdown of walsender that pg_receiving is conn
Date
Msg-id E1WPW1Q-0003uR-Mo@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix bug in clean shutdown of walsender that pg_receiving is connecting to.

On clean shutdown, walsender waits for all WAL to be replicated to a standby,
and exits. It determined whether that replication had been completed by
checking whether its sent location had been equal to a standby's flush
location. Unfortunately this condition never becomes true when the standby
such as pg_receivexlog which always returns an invalid flush location is
connecting to walsender, and then walsender waits forever.

This commit changes walsender so that it just checks a standby's write
location if a flush location is invalid.

Back-patch to 9.1 where enough infrastructure for this exists.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3857234053fccbea6344cc4a1b632750621d51d8

Modified Files
--------------
src/backend/replication/walsender.c |   13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Fix bug in clean shutdown of walsender that pg_receiving is conn
Next
From: Fujii Masao
Date:
Subject: pgsql: Fix typos in comments.