pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Wed, 31 Aug 2016 08:55:13 -0400
Message-ID: <27508.1472648113@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqTpqB1-qYn1N5iZnrjyuCWHB=j4hxy99veCDh=VyVxEmA@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>
	<25082.1472563473@sss.pgh.pa.us>
	<CAB7nPqTMej=udzm+TwUbMzfaPBfGTOY3AVpyPUP3VxdTOgHD1A@mail.gmail.com>
	<28712.1472565639@sss.pgh.pa.us>
	<CAB7nPqTpqB1-qYn1N5iZnrjyuCWHB=j4hxy99veCDh=VyVxEmA@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 11:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Thinking about it some more ... what we actually need to prevent, AFAICS,
>> is standby_mode becoming true in a standalone backend.

> I have spent some time playing with that and you are right. Only
> standby_mode = on is able trigger a failure here, and the first one is
> in WaitForWALToBecomeAvailable(). I'd just put the check at the end of
> readRecoveryCommandFile(), this will avoid extra thinking should
> readRecoveryCommandFile() be moved around. That's unlikely to happen
> but it is a cheap insurance.

Pushed with minor adjustments --- I moved the check to be closer to
existing sanity checks in readRecoveryCommandFile, tweaked the wording
(the man page for postgres refers to --single as "single-user server"
mode) and added an errcode.

			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



view thread (18+ messages)  latest in thread

Message-ID: <27508.1472648113@sss.pgh.pa.us>
Permalink:  ../27508.1472648113@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27508.1472648113@sss.pgh.pa.us

 · 

reply

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: <27508.1472648113@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> <CAB7nPqTMej=udzm+TwUbMzfaPBfGTOY3AVpyPUP3VxdTOgHD1A@mail.gmail.com> <28712.1472565639@sss.pgh.pa.us> <CAB7nPqTpqB1-qYn1N5iZnrjyuCWHB=j4hxy99veCDh=VyVxEmA@mail.gmail.com> <27508.1472648113@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