Re: [HACKERS] Crash on promotion when recovery.conf is renamed

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Magnus Hagander <magnus(at)hagander(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Crash on promotion when recovery.conf is renamed
Date: 2018-06-28 05:39:15
Message-ID: 20180628053915.GJ11054@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Thu, Jan 11, 2018 at 10:35:22PM -0500, Stephen Frost wrote:
> Magnus, this was your thread to begin with, though I know others have
> been involved, any chance you'll be able to review this for commit
> during this CF? I agree that this is certainly a good thing to have
> too, though I've not looked at the patch itself in depth. Is there
> anything we can do to help move it along?

As an effort to move on with bug items in the commit fest, attached are
two patches with a proposed commit message as well as polished comments
Those are proposed for a back-patched. The 2PC issue is particularly
bad in my opinion because having any 2PC file on-disk and corrupted
means that a transaction is lost. I have been playing a bit with
hexedit and changed a couple of bytes in one of them... If trying to
use a base backup which includes one, then the standby reading it would
be similarly confused.
--
Michael

Attachment Content-Type Size
0001-Fail-hard-when-facing-corrupted-two-phase-state-file.patch text/x-diff 3.7 KB
0002-Minimize-window-between-history-file-and-end-of-reco.patch text/x-diff 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-06-28 05:49:22 Re: partition tree inspection functions
Previous Message Andrey V. Lepikhov 2018-06-28 05:36:44 Re: [WIP] [B-Tree] Retail IndexTuple deletion