Skip site navigation (1) Skip section navigation (2)

Re: SR fails to send existing WAL file after off-line copy

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Greg Smith <greg(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Matt Chesler <matt(at)pragmatrading(dot)com>
Subject: Re: SR fails to send existing WAL file after off-line copy
Date: 2010-11-02 07:28:06
Message-ID: 4CCFBD86.9090607@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 02.11.2010 00:47, Tom Lane wrote:
> Greg Stark<gsstark(at)mit(dot)edu>  writes:
>> On Mon, Nov 1, 2010 at 12:37 AM, Heikki Linnakangas
>> <heikki(dot)linnakangas(at)enterprisedb(dot)com>  wrote:
>>> Yes, indeed there is a corner-case bug when you try to stream the very first
>>> WAL segment, with log==seg==0.
>
>> This smells very much like
>> http://article.gmane.org/gmane.comp.db.postgresql.devel.general/137052
>
>> I wonder if there's some defensive programming way to avoid bugs of this sort.
>
> It strikes me that it's not good if there isn't a recognizable "invalid"
> value for WAL locations.  These bits of code show that there is reason
> to have one.  Maybe we should teach initdb to start the WAL one segment
> later, and then 0/0 *would* mean "invalid", and we could revert these
> other hacks.

Good idea. That can even be back-patched to 9.0, it should have no 
effect on existing installations,

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2010-11-02 09:40:42
Subject: pgsql: Bootstrap WAL to begin at segment logid=0 logseg=1(000000010000
Previous:From: Peter EisentrautDate: 2010-11-02 07:13:58
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group