Re: Remove non-fast promotion Re: Should we remove a fallback promotion? take 2

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: masao(dot)fujii(at)oss(dot)nttdata(dot)com
Cc: andres(at)anarazel(dot)de, alvherre(at)2ndquadrant(dot)com, michael(at)paquier(dot)xyz, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Remove non-fast promotion Re: Should we remove a fallback promotion? take 2
Date: 2020-04-22 03:09:50
Message-ID: 20200422.120950.667254551595683133.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Wed, 22 Apr 2020 11:51:42 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
> > I meant that we always have EOR at the end of recovery. So in the
> > missing latest checkpoint (and crash recovery) case, we insert EOR
> > after the immediate checkpoint. That also means we no longer set
> > CHECKPOINT_END_OF_RECOVERY to the checkpoint, too.
>
> Could you tell me what the benefit by this change is? Even with this
> change,
> the server still needs to wait for the checkpoint to complete before
> becoming the master and starting the service, unlike fast
> promotion. No?

There's no benefit of performance. It's just for simplicity by
signalling end-of-recovery in a unified way.

Long ago, we had only non-fast promotion, which is marked by
CHECKPOINT_END_OF_RECOVERY. When we introduced fast-promotion, it is
marked by the END_OF_RECOVERY record since checkpoint record is not
inserted at the promotion time. However, we internally fall back to
non-fast promotion when we need to make a checkpoint immediately.
If we remove non-fast checkpoint, we don't need two means to signal
end-of-recovery.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2020-04-22 03:17:11 Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECT statements
Previous Message Fujii Masao 2020-04-22 02:51:42 Re: Remove non-fast promotion Re: Should we remove a fallback promotion? take 2