pgsql: pg_stat_replication.sync_state was displayed incorrectly at page - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: pg_stat_replication.sync_state was displayed incorrectly at page
Date
Msg-id E1TbwrH-0006Xd-7O@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
pg_stat_replication.sync_state was displayed incorrectly at page boundary.

XLogRecPtrIsInvalid() only checks the xrecoff field, which is correct when
checking if a WAL record could legally begin at the given position, but WAL
sending can legally be paused at a page boundary, in which case xrecoff is
0. Use XLByteEQ(..., InvalidXLogRecPtr) instead, which checks that both
xlogid and xrecoff are 0.

9.3 doesn't have this problem because XLogRecPtr is now a single 64-bit
integer, so XLogRecPtrIsInvalid() does the right thing. Apply to 9.2, and
9.1 where pg_stat_replication view was introduced.

Kyotaro HORIGUCHI, reviewed by Fujii Masao.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3f7b04d6f694b447c17999ef0aed406e658de82f

Modified Files
--------------
src/backend/replication/syncrep.c   |    5 +++--
src/backend/replication/walsender.c |    4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: pg_stat_replication.sync_state was displayed incorrectly at page
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Remove -Wlogical-op from standard compiler flags