From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Skip checkpoint on promoting from streaming replication |
Date: | 2012-06-08 08:22:01 |
Message-ID: | 20120608.172201.126345187.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
I have a problem with promoting from hot-standby that exclusive
checkpointing retards completion of promotion.
This checkpoint is "shutdown checkpoint" as a convention in
realtion to TLI increment according to the comment shown below. I
suppose "shutdown checkpoint" means exclusive checkpoint - in
other words, checkpoint without WAL inserts meanwhile.
> * one. This is not particularly critical, but since we may be
> * assigning a new TLI, using a shutdown checkpoint allows us to have
> * the rule that TLI only changes in shutdown checkpoints, which
> * allows some extra error checking in xlog_redo.
I depend on this and suppose we can omit it if latest checkpoint
has been taken so as to be able to do crash recovery thereafter.
This condition could be secured by my another patch for
checkpoint_segments on standby.
After applying this patch, checkpoint after archive recovery at
near the end of StartupXLOG() will be skiped on the condition
follows,
- WAL receiver has been launched so far. (using WalRcvStarted())
- XLogCheckpointNeeded() against replayEndRecPtr says no need of
checkpoint.
What do you think about this?
This patch needs WalRcvStarted() introduced by my another patch.
http://archives.postgresql.org/pgsql-hackers/2012-06/msg00287.php
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
== My e-mail address has been changed since Apr. 1, 2012.
Attachment | Content-Type | Size |
---|---|---|
skip_ckpt_after_rcv_on_stby_20120608_1.patch | text/x-patch | 1.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-06-08 08:46:37 | Re: [v9.3] Extra Daemons (Re: elegant and effective way for running jobs inside a database) |
Previous Message | Kyotaro HORIGUCHI | 2012-06-08 08:14:48 | Checkpointer on hot standby runs without looking checkpoint_segments |