On Fri, Jun 04, 2021 at 07:49:21PM +0530, Nitin Jadhav wrote:
> I have added the proper logs in all of the above scenarios.
>
> Following is the sample log displayed during server startup when the
> time period is set to 10ms.
>
> 2021-06-04 19:40:06.390 IST [51116] LOG: Syncing data directory, elapsed time: 14.165 ms, current path:
./base/13892/16384_fsm
> 2021-06-04 19:40:06.399 IST [51116] LOG: Syncing data directory completed after 22.661 ms
|2021-06-04 19:40:07.222 IST [51116] LOG: Performing crash recovery, elapsed time: 820.805 ms, current LSN:
0/76F6F10
|2021-06-04 19:40:07.227 IST [51116] LOG: invalid record length at 0/774E758: wanted 24, got 0
|2021-06-04 19:40:07.227 IST [51116] LOG: redo done at 0/774E730 system usage: CPU: user: 0.77 s, system: 0.03 s,
elapsed:0.82 s
Should it show the rusage ? It's shown at startup completion since 10a5b35a0,
so it seems strange not to show it here.
+ log_startup_process_progress("Syncing data directory", path, false);
I think the fsync vs syncfs paths should be distinguished: "Syncing data
directory (fsync)" vs "Syncing data directory (syncfs)".
+ {"log_min_duration_startup_process", PGC_SUSET, LOGGING_WHEN,
I think it should be PGC_SIGHUP, to allow changing it during runtime.
Obviously it has no effect except during startup, but the change will be
effective if the current process crashes.
See also: https://www.postgresql.org/message-id/20210526001359.GE3676@telsasoft.com
+extern void log_startup_process_progress(char *operation, void *data,
+ bool is_complete);
I think this should take an enum operation, rather than using strcmp() on it
later. The enum values might be RECOVERY_START, RECOVERY_END, rather than
having a bool is_complete.
--
Justin