Support for PGCTLTIMEOUT variable
pg_ctl
command gives PostgreSQL 60 seconds to start and fails if it is still not up after that time. This timeout can be configured using PGCTLTIMEOUT
environment variable. It can be useful if the startup process is expected to take longer - for example if the database was shut down incorrectly and needs to perform WAL replay.
HAF, however, does not start PostgreSQL by directly invoking pg_ctl
, but rather by the init script, which calls pg_ctlcluster
. The latter command invokes pg_ctl
in the environment that only contains variables defined in /etc/postgresql/14/main/environment
. This causes HAF to ignore PGCTLTIMEOUT
if it is set.