From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Bernd Helmle <mailings@oopsware.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: standalone backend PANICs during recovery
Date: Tue, 30 Aug 2016 09:24:33 -0400
Message-ID: <25082.1472563473@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqSTN3Q_qz1Xu3=nEW5v_=AN=cXoPFBLTvW8SBEsBR42DQ@mail.gmail.com>
References: <20160402215748.GA136801@alvherre.pgsql>
<12838.1471639801@sss.pgh.pa.us>
<2086.1471711308@sss.pgh.pa.us>
<2DA7350F7296B2A142272901@eje.land.credativ.lan>
<CAB7nPqTWSW83pDu1VOgzG4ikM+_Da9AwFCgEWHWmgv87tp2FoA@mail.gmail.com>
<23650.1472561302@sss.pgh.pa.us>
<CAB7nPqSTN3Q_qz1Xu3=nEW5v_=AN=cXoPFBLTvW8SBEsBR42DQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Michael Paquier <michael.paquier@gmail.com> writes:
> On Tue, Aug 30, 2016 at 9:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 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().
I don't see anything very exciting between the beginning of StartupXLOG
and readRecoveryCommandFile. In particular, doing the fsync seems like
a perfectly harmless and maybe-good thing. If there were some operation
with potentially bad side-effects in that range, it would be dangerous
anyway because of the risk of readRecoveryCommandFile erroring out due
to invalid contents of recovery.conf.
This might be an argument for re-ordering what we're doing in StartupXLOG,
but that seems like an independent discussion.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, mailings@oopsware.de, alvherre@2ndquadrant.com, simon@2ndquadrant.com
Subject: Re: standalone backend PANICs during recovery
In-Reply-To: <25082.1472563473@sss.pgh.pa.us>
References: <20160402215748.GA136801@alvherre.pgsql> <12838.1471639801@sss.pgh.pa.us> <2086.1471711308@sss.pgh.pa.us> <2DA7350F7296B2A142272901@eje.land.credativ.lan> <CAB7nPqTWSW83pDu1VOgzG4ikM+_Da9AwFCgEWHWmgv87tp2FoA@mail.gmail.com> <23650.1472561302@sss.pgh.pa.us> <CAB7nPqSTN3Q_qz1Xu3=nEW5v_=AN=cXoPFBLTvW8SBEsBR42DQ@mail.gmail.com> <25082.1472563473@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox