Re: BUG #12072: init script creates pid file with wrong owner - Mailing list pgsql-bugs

From Devrim Gündüz
Subject Re: BUG #12072: init script creates pid file with wrong owner
Date
Msg-id 1417476748.25575.3.camel@sayfabulunamadi.com
Whole thread Raw
In response to BUG #12072: init script creates pid file with wrong owner  (henrik-postgres@hswn.dk)
List pgsql-bugs
Hi,

On Wed, 2014-11-26 at 14:19 +0000, henrik-postgres@hswn.dk wrote:
>
> The /etc/init.d/postgresql-9.3 file created a PID file, but fails to
> make it owned by user 'postgres'.
>
> This means that using the "pg_ctl" command to restart Postgres fails,
> because user postgres cannot update the pid file (if you set
> external_pid_file in postgresql.conf so it can find the pid file).

I don't think that we designed the *init script* (kicked by init
subsystem) to be compatible with pg_ctl command (called by postgres
user). If you have an environment that requires a non-root user to
restart postgres, you can hack the init script and add a chown line
there.

That pid file is used by RHCS (IIRC), so I am not inclined to touch it.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


pgsql-bugs by date:

Previous
From: Henrik Størner
Date:
Subject: Re: BUG #12072: init script creates pid file with wrong owner
Next
From: eshkinkot@gmail.com
Date:
Subject: BUG #12128: Cannot start backup again if it shutdown after replay one *.history file.