Re: BUG #12072: init script creates pid file with wrong owner

From: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
To: henrik-postgres(at)hswn(dot)dk
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12072: init script creates pid file with wrong owner
Date: 2014-12-01 05:07:24
Message-ID: CANFyU97+vW3x1c0b=cOy5CwcPAKw-oOqJ7p2hfwv2nNrn=3JoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The init script will first do "su - postgres" before starting the server,
so there is no way that the owner of the PID file (default location is
$DATADIR/postmaster.pid) is not postgres. Please recheck.

On Wed, Nov 26, 2014 at 7:49 PM, <henrik-postgres(at)hswn(dot)dk> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 12072
> Logged by: Henrik Storner
> Email address: henrik-postgres(at)hswn(dot)dk
> PostgreSQL version: 9.3.5
> Operating system: CentOS 6.6
> Description:
>
> 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).
>
> The init script should do a "chown postgres:postgres $pidfile" so the pid
> file is owned by the postgres user. This allows pg_ctl commands to work.
>
>
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

--
Sandeep Thakkar

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-12-01 06:09:16 Re: BUG #12072: init script creates pid file with wrong owner
Previous Message bouda 2014-12-01 00:34:48 BUG #12108: Documentation: Limitation of shell types not mentioned