Re: Assertion failure in walreceiver - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Assertion failure in walreceiver
Date
Msg-id 3f0b79eb1002241833g31a1f28fy82dce25f9ad1cc7c@mail.gmail.com
Whole thread Raw
In response to Re: Assertion failure in walreceiver  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Assertion failure in walreceiver
List pgsql-hackers
On Thu, Feb 25, 2010 at 5:29 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Hmm, interesting corner case. That assertion is checking that the
> streaming starting point is initialized correctly, but 0/0 is actually a
> valid value when you start streaming from the very first WAL segment.
>
> I guess we can just remove the assertion. If an incorrect zero value
> finds its way there due to some bug, nothing particularly bad will
> happen; you'll just get an error because the WAL segment most likely
> doesn't exist in the primary anymore.

And we need to remove the following code from XLogSend(). This code is
useless now since the initial CopyData message is guaranteed to arrive
at the primary before doing XLogSend().

> /*
>  * Invalid position means that we have not yet received the initial
>  * CopyData message from the slave that indicates where to start the
>  * streaming.
>  */
> if (sentPtr.xlogid == 0 &&
>     sentPtr.xrecoff == 0)
>     return true;


I have one question. Do we support starting an archive recovery and
standby server from a cold backup (not a base backup taken by online
backup)? Though I think they would work and be very useful, I'm not
sure they are safe.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_stop_backup does not complete
Next
From: "Joshua D. Drake"
Date:
Subject: Re: pg_stop_backup does not complete