[PATCH] pg_receivexlog: fixed to work with logical segno > 0

Поиск
Список
Период
Сортировка
От Mika Eloranta
Тема [PATCH] pg_receivexlog: fixed to work with logical segno > 0
Дата
Msg-id 1383298950-1741-1-git-send-email-mel@ohmu.fi
обсуждение исходный текст
Ответы Re: [PATCH] pg_receivexlog: fixed to work with logical segno > 0  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список 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
supposedto be
 
-- 
1.8.0.1




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: How should row-security affects ON UPDATE RESTRICT / CASCADE ?
Следующее
От: "Etsuro Fujita"
Дата:
Сообщение: Re: Show lossy heap block info in EXPLAIN ANALYZE for bitmap heap scan