Re: standalone backend PANICs during recovery

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: standalone backend PANICs during recovery
Date: 2016-08-30 13:06:05
Message-ID: CAB7nPqSTN3Q_qz1Xu3=nEW5v_=AN=cXoPFBLTvW8SBEsBR42DQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 30, 2016 at 9:48 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> On Wed, Aug 24, 2016 at 5:07 PM, Bernd Helmle <mailings(at)oopsware(dot)de> wrote:
>>> That said, i'm okay if --single is not intended to bring up a hot standby.
>>> There are many other ways to debug such problems.
>
>> This patch is still on the CF app:
>> https://commitfest.postgresql.org/10/610/
>> Even after thinking about it, my opinion is still the same. Let's
>> prevent a standalone backend to start if it sees recovery.conf.
>> Attached is a patch and the CF entry is switched as ready for
>> committer to move on.
>
> Hm, StartupXLOG seems like a pretty random place to check that, especially
> since doing it there requires an extra stat() call. Why didn't you just
> make readRecoveryCommandFile() error out?

Well, the idea is to do the check before doing anything on PGDATA and
leave it intact, particularly the post-crash fsync().
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-08-30 13:08:34 Re: Comment on GatherPath.single_copy
Previous Message Tom Lane 2016-08-30 13:02:58 Re: sequences and pg_upgrade