]> granicus.if.org Git - postgresql/commit
Fix parsing of xlog file name in pg_receivexlog.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 4 Nov 2013 08:51:37 +0000 (10:51 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 4 Nov 2013 08:57:58 +0000 (10:57 +0200)
commit2103430179c6be37d68364c84d68d5211472f528
tree7b7de3a5106707adfe53e6f0114f3f9044951769
parente36ce0c7f7b329b25f92cf440fd88fcc695de101
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.
src/bin/pg_basebackup/pg_receivexlog.c