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

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
Cc: 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: 2021-12-09 02:11:52
Message-ID: CALj2ACXjNyY2OCLZxOgbB52RAOtsEq7Et5ACFa+17Sp1uN2ySw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 8, 2021 at 11:02 PM Bossart, Nathan <bossartn(at)amazon(dot)com> wrote:
>
> On 12/8/21, 3:29 AM, "Bharath Rupireddy" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> > Thanks for your thoughts. I'm fine either way, hence attaching two
> > patches here with and I will leave it for the committer 's choice.
> > 1) v1-0001-Add-DB_IN_END_OF_RECOVERY_CHECKPOINT-state-for-co.patch --
> > adds new db state DB_IN_END_OF_RECOVERY_CHECKPOINT for control file.
> > 2) v1-0001-Skip-control-file-db-state-updation-during-end-of.patch --
> > just skips setting db state to DB_SHUTDOWNING and DB_SHUTDOWNED in
> > case of end-of-recovery checkpoint so that the state will be
> > DB_IN_CRASH_RECOVERY which then changes to DB_IN_PRODUCTION.
>
> I've bumped this one to ready-for-committer. For the record, my
> preference is the second patch (for the reasons discussed upthread).
> Both patches might benefit from a small comment or two, too.

Thanks. I've added a comment to the patch
v2-0001-Skip-control-file-db-state-updation-during-end-of.patch. The
other patch remains the same as the new state
DB_IN_END_OF_RECOVERY_CHECKPOINT introduced there says it all.

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v2-0001-Skip-control-file-db-state-updation-during-end-of.patch application/octet-stream 1.9 KB
v1-0001-Add-DB_IN_END_OF_RECOVERY_CHECKPOINT-state-for-co.patch application/octet-stream 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-12-09 02:26:38 Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display
Previous Message houzj.fnst@fujitsu.com 2021-12-09 01:59:02 RE: row filtering for logical replication