Subject: Why might it take so long to start up a cleanly-stopped instance?

From: Ron Johnson <[email-masked]>
Date: Sat, 14 Dec 2024 13:28:55 -0500

PG 14.15 on RHEL 7.9

This is a rather small system, and only one or two user connections existed
at the time.

$ pg_ctl stop -wt9999 && pg_ctl start -wt9999
waiting for server to shut down........... done
server stopped
waiting for server to
start.................................................................................................................................................................................................................................2024-12-14
13:21:10.820 EST            24567            00000   LOG:  00000:
redirecting log output to logging collector process
2024-12-14 13:21:10.820 EST            24567            00000   HINT:
 Future log output will appear in directory "/var/log/postgresql".
2024-12-14 13:21:10.820 EST            24567            00000   LOCATION:
 SysLogger_Start, syslogger.c:674
. done
server started

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

---

From: Tom Lane <[email-masked]>
Date: Sat, 14 Dec 2024 16:42:52 -0500

>  SysLogger_Start, syslogger.c:674

That's quite odd: the delay evidently happens before SysloggerStart,
which is done mighty early.  Perhaps strace'ing the start would yield
insight.

			regards, tom lane