Skip site navigation (1) Skip section navigation (2)

pgsql: pg_stat_replication.sync_state was displayed incorrectly atpage

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_stat_replication.sync_state was displayed incorrectly atpage
Date: 2012-11-23 17:16:07
Message-ID: E1TbwrH-0006Xf-7W@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: 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_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/38b38fb12244c640230b1fd71d2c55ecc04844fa

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

pgsql-committers by date

Next:From: Peter EisentrautDate: 2012-11-23 21:25:34
Subject: pgsql: Remove -Wlogical-op from standard compiler flags
Previous:From: Michael MeskesDate: 2012-11-23 13:40:52
Subject: pgsql: Applied patch by Chen Huajun <chenhj@cn.fujitsu.com> to makeecp

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group