On 2014/09/22 19:03, frantisek holop wrote:
> what happens is, that pg_ctl's return code cannot
> be trusted because it starts the server in background
> and does not wait for confirmation. to really make
> sure the server was started, -w must be used:
I think -w makes sense.
> my last issue is "check": i think it is a bit of overkill
> that i have to be root to check if postgres is running.
> this is because daemon_user is defined. so not even
> '_postgresql' is allowed to check, although it
> is allowed to run the actual 'pg_ctl check' command.
it may be allowed to run it, but ...
<sthen@hub:~:1278>$ pg_ctl -D /var/postgresql status
pg_ctl: no server running
<sthen@hub:~:1279>$ pgrep -lf postg
15784 postgres: stats collector process
12782 postgres: autovacuum launcher process
1792 postgres: wal writer process
1744 postgres: writer process
27185 postgres: checkpointer process
7867 /usr/local/bin/postgres -D /var/postgresql/data
> i think it would make sense to get rid of rc_usercheck=NO,
> all of rc_check() and override pexp= to the actual
> daemon signature instead of pg_ctl.. this way any user
> can run the check.
problem with multi-process servers is how to decide which process
indicates that it's actually running. I'm happier to defer to
the software's own checks if they make sense (and I think they do
here).
> you want to have an another default encoding, use the option -E with initdb:
^^
oh we should zap the extra 'an' in here.