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

From Bossart, Nathan
Subject Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?
Date
Msg-id 81ACB110-C4E3-4F96-80DC-343607F143C9@amazon.com
Whole thread Raw
In response to Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?
List pgsql-hackers
On 12/7/21, 12:10 AM, "Bharath Rupireddy" <bharath.rupireddyforpostgres@gmail.com> wrote:
> Here's a patch that I've come up with. Please see if this looks okay
> and let me know if we want to take it forward so that I can add a CF
> entry.

Overall, the patch seems reasonable to me.

+        case DB_IN_END_OF_RECOVERY_CHECKPOINT:
+            ereport(LOG,
+                    (errmsg("database system was interrupted while in end-of-recovery checkpoint at %s",
+                            str_time(ControlFile->time))));
+            break;

I noticed that some (but not all) of the surrounding messages say
"last known up at" the control file time.  I'm curious why you chose
not to use that phrasing in this case.

Nathan


pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: Pre-allocating WAL files
Next
From: Tomas Vondra
Date:
Subject: Re: Transparent column encryption