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

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <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-25 19:20:05
Message-ID: 9D3CE856-9062-4D91-85E3-B222FE70992B@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Nathan

Attachment Content-Type Size
v3-0001-Skip-control-file-db-state-updation-during-end-of.patch application/octet-stream 8.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-01-25 19:27:55 Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)
Previous Message Robert Haas 2022-01-25 19:04:03 Re: CREATEROLE and role ownership hierarchies