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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, 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-01 22:47:30
Message-ID: 7156.1288651650@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-01 22:59:48 Re: why does plperl cache functions using just a bool for is_trigger
Previous Message Alex Hunsaker 2010-11-01 22:30:18 Re: why does plperl cache functions using just a bool for is_trigger