Re: postmaster.pid

From: "Herr, Christian" <cherr(at)vt(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: postmaster.pid
Date: 2014-04-11 14:02:06
Message-ID: 7867B2C2E5390B459CC8848B8EF781DA87E433D70D@fangorn.cc.w2k.vt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thanks, you pointed out exactly what the problem was. postgresql.conf had external_pid_file set to write to $PGDATA/postmaster.pid, which was overwriting the "real" postmaster.pid with only a single line. Maybe this was a configuration holdover from an older version, since the comment above this setting was: " # If external_pid_file is not explicitly set, no extra PID file is written."

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Friday, April 11, 2014 9:52 AM
To: Herr, Christian
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] postmaster.pid

"Herr, Christian" <cherr(at)vt(dot)edu> writes:
> We have a config-only setup (postgresql.conf exists not in $PGDATA). In postgresql.conf, external_pid_file is set and creates postmaster.pid in $PGDATA. Issuing "pg_ctl start", the contents of postmaster.pid only ever contains one line, the process ID. It never contains any other lines, but according to specs, it's supposed to have 7 lines. Any idea why postmaster.pid is only containing a single line, the process ID and no other lines?

Only the "real" pid file (the one in the data directory) has extra lines.
A file created for external_pid_file contains the PID and nothing more.

If you specified external_pid_file as pointing to the data directory, then you broke things badly. Do not do that.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Brent Dombrowski 2014-04-11 14:29:07 Re: Variables inside PostgreSQL/PostGIS query in PHP file
Previous Message Tom Lane 2014-04-11 13:52:20 Re: postmaster.pid