From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Remove secondary checkpoint |
Date: | 2017-10-24 14:46:41 |
Message-ID: | CANP8+j+Bdp1ZF8noCJ_j+Gbx125-xz3X6zV7WV4AQH5Bv2a6Kw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 October 2017 at 09:50, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
>> Remove the code that maintained two checkpoint's WAL files and all
>> associated stuff.
>
>> Try to avoid breaking anything else
>
>> This
>> * reduces disk space requirements on master
>> * removes a minor bug in fast failover
>> * simplifies code
>
> Doesn't it also make crash recovery less robust? The whole point
> of that mechanism is to be able to cope if the latest checkpoint
> record is unreadable. If you want to toss that overboard, I think
> you need to make the case why we don't need it, not just post a
> patch removing it. *Of course* the code is simpler without it.
> That's utterly irrelevant. The code would be even simpler with
> no crash recovery at all ... but we're not going there.
Well, the mechanism has already been partially removed since we don't
maintain two checkpoints on a standby. So all I'm proposing is we
remove the other half.
I've not seen myself, nor can I find an example online where the
primary failed yet the secondary did not also fail from the same
cause.
If it is a possibility to do this, now we have pg_waldump we can
easily search for a different checkpoint and start from there instead
which is a more flexible approach. If you didn't save your WAL and
don't have any other form of backup, relying on the secondary
checkpoint is not exactly a safe bet.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Gaddam Sai Ram | 2017-10-24 14:55:24 | Re: CurTransactionContext freed before transaction COMMIT ??? |
Previous Message | Tom Lane | 2017-10-24 14:36:42 | Re: Current int & float overflow checking is slow. |