Record previous TLI in end-of-recovery record (was Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.)

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Record previous TLI in end-of-recovery record (was Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.)
Date: 2013-02-07 16:07:44
Message-ID: 5113D150.3070507@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

(this is unrelated to the other discussion about this patch)

On 29.01.2013 02:07, Simon Riggs wrote:
> Fast promote mode skips checkpoint at end of recovery.
> pg_ctl promote -m fast will skip the checkpoint at end of recovery so that we
> can achieve very fast failover when the apply delay is low. Write new WAL record
> XLOG_END_OF_RECOVERY to allow us to switch timeline correctly for downstream log
> readers. If we skip synchronous end of recovery checkpoint we request a normal
> spread checkpoint so that the window of re-recovery is low.

It just occurred to me that it would be really nice if the
end-of-recovery record, and the timeline-switching shutdown checkpoint
record too for that matter, would include the previous timeline's ID
that we forked from, in addition to the new TLI. Although it's not
required for anything at the moment, it would be useful debugging
information. It would allow reconstructing timeline history files from
the WAL; that might come handy.

Barring objections, I'll add that.

- Heikki

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2013-02-07 16:24:55 Re: Record previous TLI in end-of-recovery record (was Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.)
Previous Message Kevin Grittner 2013-02-07 15:18:40 Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2013-02-07 16:24:55 Re: Record previous TLI in end-of-recovery record (was Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.)
Previous Message Kevin Grittner 2013-02-07 15:18:40 Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.