Properly initialize write, flush and replay locations in walsender slots

Magnus Hagander <magnus@hagander.net>

Commit: a1fb84990dc172f21f12a8fb79ab58876e81fe6b
Author: Magnus Hagander <magnus@hagander.net>
Date: 2015-12-13T15:44:04Z
Releases: 9.3.11
Properly initialize write, flush and replay locations in walsender slots

These would leak random xlog positions if a walsender used for backup would
a walsender slot previously used by a replication walsender.

In passing also fix a couple of cases where the xlog pointer is directly
compared to zero instead of using XLogRecPtrIsInvalid, noted by
Michael Paquier.

Files

PathChange+/−
src/backend/replication/walsender.c modified +6 −3