Re: when the startup process doesn't (logging startup delays) - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: when the startup process doesn't (logging startup delays)
Date
Msg-id 20210617125254.GB31772@telsasoft.com
Whole thread Raw
In response to Re: when the startup process doesn't  (Nitin Jadhav <nitinjadhavpostgres@gmail.com>)
Responses Re: when the startup process doesn't (logging startup delays)
List pgsql-hackers
+ * Codes of the operations performed during startup process
+ */
+typedef enum StartupProcessOp
+{
+       SYNCFS_IN_PROGRESS,
+       FSYNC_IN_PROGRESS,
+       RECOVERY_IN_PROGRESS,
+       RESET_UNLOGGED_REL_IN_PROGRESS,
+       DUMMY,
+       SYNCFS_END,
+       FSYNC_END,
+       RECOVERY_END,
+       RESET_UNLOGGED_REL_END
+} StartupProcessOp;

What is DUMMY about ?  If you just want to separate the "start" from "end",
you could write:

/* codes for start of operations */
FSYNC_IN_PROGRESS
SYNCFS_IN_PROGRESS
...
/* codes for end of operations */
FSYNC_END
SYNCFS_END
...

Or group them together like:

FSYNC_IN_PROGRESS,
FSYNC_END,
SYNCFS_IN_PROGRESS, 
SYNCFS_END,
RECOVERY_IN_PROGRESS,
RECOVERY_END,
RESET_UNLOGGED_REL_IN_PROGRESS,
RESET_UNLOGGED_REL_END,

-- 
Justin



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgbench logging broken by time logic changes
Next
From: Heikki Linnakangas
Date:
Subject: Re: Issue with some calls to GetMultiXactIdMembers()