Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: bossartn(at)amazon(dot)com
Cc: michael(at)paquier(dot)xyz, bharath(dot)rupireddyforpostgres(at)gmail(dot)com, jcasanov(at)systemguards(dot)com(dot)ec, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?
Date: 2022-01-28 07:57:42
Message-ID: 20220128.165742.1475860612255162338.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Tue, 25 Jan 2022 19:20:05 +0000, "Bossart, Nathan" <bossartn(at)amazon(dot)com> wrote in
> On 1/24/22, 9:16 PM, "Michael Paquier" <michael(at)paquier(dot)xyz> wrote:
> > Now, I also find confusing the state of CreateCheckpoint() once this
> > patch gets applied. Now the code and comments imply that an
> > end-of-recovery checkpoint is a shutdown checkpoint because they
> > perform the same actions, which is fine. Could it be less confusing
> > to remove completely the "shutdown" variable instead and replace those
> > checks with "flags"? What the patch is doing is one step in this
> > direction.
>
> I looked into removing the "shutdown" variable in favor of using
> "flags" everywhere, but the patch was quite messy and repetitive. I
> think another way to make things less confusing is to replace
> "shutdown" with an inverse variable called "online." The attached
> patch does it this way.

I find that change doesn't work. As Michael said the "shutdown" is
implies "shutdown checkpoint". And end-of-recovery checkpoint is done
online (means "not-shutdowning"). shutdown_checkpoint works for me.
Renaming "shutdown checkpoint" as "exclusive checkpoint" or so also
works for me but I think it would cause halation (or zealous
objections)..

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-01-28 08:19:19 Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?
Previous Message Kyotaro Horiguchi 2022-01-28 07:26:22 Re: Suppressing useless wakeups in walreceiver