You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initscript: don't block system start-up by default
This commit should resolve complaints against pg_ctl -w usage from
initscript (see rhbz#800534 for more info).
The problem is that pg_ctl -w can block whole system startup too
long - until the server is fully ready to accept connections. The
commit 8c7b2cd thus invented
basically bad approach for initscript.
Now, the "-w" option is used only if the PGSTARTWAIT is explicitly
set to 1 by administrator. In this case, the PGSTARTTIMEOUT
numeric value (in seconds) is respected (or limit 30 seconds is
set by default).
Otherwise, if PGSTARTWAIT is unset (default), initscript keeps
checking only for the pidfile existence (at most PGSTARTTIMEOUT
seconds). The hardwired 'sleep 2' command (activated before
8c7b2cd commit) is still not used - regular/default system
startup should be a bit faster than before.
* postgresql.init.in (start): Fix handling of PGDATA, PGPORT,
PGOPTS and PGSCLS - to respect special quoting characters inside,
we should escape the strings before passing those to command
evaluation. Use printf %q as we use bash and we don't care too
much about portability. Also, don't call postgresql-ctl with -w
option if PGSTARTWAIT is empty or undefined. Implement pidfile
polling for the cases PGSTARTWAIT is unset. Return success faster
if server is already running.
($PGSTARTWAIT): New env variable.
* postgresql-ctl.in: Don't parse $PGPORT into -o option as it is
not needed. Unset PGPORT if the variable is empty - postgres
server would fail with empty value.
* configure.ac: Bump version to 3.3.
* NEWS: Document bugfixes.
0 commit comments