From: | Mika Eloranta <mel(at)ohmu(dot)fi> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Mika Eloranta <mel(at)ohmu(dot)fi> |
Subject: | [PATCH] pg_receivexlog: fixed to work with logical segno > 0 |
Date: | 2013-11-01 09:42:30 |
Message-ID: | 1383298950-1741-1-git-send-email-mel@ohmu.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 supposed to be
--
1.8.0.1
From | Date | Subject | |
---|---|---|---|
Next Message | g.vanluffelen | 2013-11-01 10:38:28 | BUG #8573: int4range memory consumption |
Previous Message | Craig Ringer | 2013-11-01 08:57:41 | Re: How should row-security affects ON UPDATE RESTRICT / CASCADE ? |