From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Crash on promotion when recovery.conf is renamed |
Date: | 2016-12-20 07:54:34 |
Message-ID: | CAB7nPqRNRFXDF_ds7pKHMKh8X4VqAWbyFdC29dFYRgZMQx-bmA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Dec 17, 2016 at 9:23 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Fri, Dec 16, 2016 at 7:08 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> wrote:
>> Looking at PrescanPreparedTransactions(), I am thinking as well that it
>> would
>> be better to get a hard failure when bumping on a corrupted 2PC file.
>> Future
>> files are one thing, but corrupted files should be treated more carefully.
>
>
> Again without looking at it, I agree (so much easier that way :P). Ignoring
> corruption is generally a bad idea. Failing hard makes the user notice the
> error, and makes it possible to initiate recovery from a standby or from
> backups or something, or to *intentionally* remove/clear/ignore it.
And I am finishing with the two patches attached:
- 0001 changes the 2PC checks so as corrupted entries are FATAL.
PreScanPreparedTransaction is used when a hot standby is initialized.
In this case a failure protects the range of XIDs generated,
potentially saving from corruption of data. At the end of recovery,
this is done before any on-disk actions are taken.
- 0002 is the thing that Heikki has sent previously to minimize the
window between end-of-recovery record write and timeline history file
archiving.
I am attaching that to next CF.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
0002-Minimize-window-between-history-file-and-end-of-reco.patch | text/x-diff | 2.7 KB |
0001-Change-detection-of-corrupted-2PC-files-as-FATAL.patch | text/x-diff | 3.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2016-12-20 08:11:23 | Re: Time to drop old-style (V0) functions? |
Previous Message | Beena Emerson | 2016-12-20 07:46:08 | Re: increasing the default WAL segment size |