pg_receivexlog calculated the xlog segment number incorrectly
when started after the previous instance was interrupted.
Resuming streaming only worked when the physical wal segment
counter was zero, i.e. for the first 256 segments or so.
---src/bin/pg_basebackup/pg_receivexlog.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
index 031ec1a..6f9fcf4 100644
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ b/src/bin/pg_basebackup/pg_receivexlog.c
@@ -171,7 +171,7 @@ FindStreamingStart(uint32 *tli) progname, dirent->d_name);
disconnect_and_exit(1); }
- segno = ((uint64) log) << 32 | seg;
+ segno = (((uint64) log) << 8) | seg; /* * Check that the segment has the right size, if it's
supposedto be
--
1.8.0.1