pgsql: Bootstrap WAL to begin at segment logid=0 logseg=1 (000000010000

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Bootstrap WAL to begin at segment logid=0 logseg=1 (000000010000
Date: 2010-11-02 09:40:42
Message-ID: E1PDDMA-0000jV-LG@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Bootstrap WAL to begin at segment logid=0 logseg=1 (000000010000000000000001)
rather than 0/0, so that we can safely use 0/0 as an invalid value. This is a
more future-proof fix for the corner-case bug in streaming replication that
was fixed yesterday. We had a similar corner-case bug with log/seg 0/0 back in
February as well. Avoiding 0/0 as a valid value should prevent bugs like that
in the future. Per Tom Lane's idea.

Back-patch to 9.0. Since this only affects bootstrapping, it makes no
difference to existing installations. We don't need to worry about the
bug in existing installations, because if you've managed to get past the
initial base backup already, you won't hit the bug in the future either.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=8c843fff2d8db7889b81782ab4f3324cbda4ed2a

Modified Files
--------------
src/backend/access/transam/xlog.c | 21 ++++++++++++---------
src/backend/replication/walsender.c | 2 +-
2 files changed, 13 insertions(+), 10 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2010-11-02 17:14:53 pgsql: Some cleanup in ecpg code:
Previous Message Peter Eisentraut 2010-11-02 04:20:09 Re: pgsql: Tag refs/tags/REL9_1_ALPHA2 was created

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-11-02 10:56:33 B-tree parent pointer and checkpoints
Previous Message Heikki Linnakangas 2010-11-02 07:28:06 Re: SR fails to send existing WAL file after off-line copy