Re: Assertion failure in walreceiver

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, "<pgsql-hackers(at)postgresql(dot)org>" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assertion failure in walreceiver
Date: 2010-02-25 02:33:02
Message-ID: 3f0b79eb1002241833g31a1f28fy82dce25f9ad1cc7c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 25, 2010 at 5:29 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-02-25 02:57:35 Re: Streaming replication and pg_xlogfile_name()
Previous Message Tom Lane 2010-02-25 02:19:22 Re: pg_stop_backup does not complete