Henrik Størner <henrik@hswn.dk> writes:
> The problem is with the init script installed from the rpm package. From
> line 161 it performs the server start by doing
> echo -n "$PSQL_START"
> $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D
> '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null
> sleep 2
> pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null`
> if [ "x$pid" != x ]
> then
> success "$PSQL_START"
> touch "$lockfile"
> * echo $pid > "$pidfile"*
> echo
> else
> failure "$PSQL_START"
> echo
> script_result=1
> fi
> Note the
> echo $pid > "$pidfile"
> This creates a pid-file owned by root.
Why is the init script creating such a file at all? Surely it should be
depending on the one created by the postmaster. However, if there is a
reason to create a separate pidfile, I don't see the problem particularly:
the postmaster will neither create nor remove it, so it hardly matters
what the ownership is.
regards, tom lane