pgsql: Fix parsing of xlog file name in pg_receivexlog.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix parsing of xlog file name in pg_receivexlog.
Date: 2013-11-04 09:00:37
Message-ID: E1VdG1V-0007kC-U4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix parsing of xlog file name in pg_receivexlog.

The parsing of WAL filenames of segments larger than > 255 was broken,
making pg_receivexlog unable to restart streaming after stopping it.

The bug was introduced by the changes in 9.3 to represent WAL segment number
as a 64-bit integer instead of two ints, log and seg. To fix, replace the
plain sscanf call with XLogFromFileName macro, which does the conversion
from log+seg to a 64-bit integer correcly.

Reported by Mika Eloranta.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e843d12ebc6cfea9704eca5da62a78ac34ad2602

Modified Files
--------------
src/bin/pg_basebackup/pg_receivexlog.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-11-04 16:22:59 pgsql: Fix format code used to print dsm request sizes.
Previous Message Tom Lane 2013-11-03 16:55:47 pgsql: Get rid of more cases of the "must detoast before output functio