pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres running but no postmaster.pid
6+ messages / 3 participants
[nested] [flat]

* Postgres running but no postmaster.pid
@ 2011-08-03 15:02  simon.marshall <simon.marshall@metaswitch.com>
  0 siblings, 1 reply; 6+ messages in thread

From: simon.marshall @ 2011-08-03 15:02 UTC (permalink / raw)
  To: pgsql-bugs

Hi guys,

When I came to stop my postgres instance (in particular, a replication
database using postgres version 9.0.3 running on port 5442) today it failed
to stop because the postmaster.pid instance wasn't present, despite the
process still running (seen by running ps -eaf | grep post and noting that
the data directory was the same). There's nothing in /var/adm/messages to
suggest any catastrophic disk problems and there's plenty of space on the
drive.

Any help would be greatly appreciated, as I'm stumped!

Thanks,
Simon

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-running-but-no-postmaster-pid-tp4662510p4662510.htm...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgres running but no postmaster.pid
@ 2011-08-03 15:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: simon.marshall <simon.marshall@metaswitch.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2011-08-03 15:44 UTC (permalink / raw)
  To: simon.marshall <simon.marshall@metaswitch.com>; +Cc: pgsql-bugs

"simon.marshall" <simon.marshall@metaswitch.com> writes:
> When I came to stop my postgres instance (in particular, a replication
> database using postgres version 9.0.3 running on port 5442) today it failed
> to stop because the postmaster.pid instance wasn't present, despite the
> process still running (seen by running ps -eaf | grep post and noting that
> the data directory was the same). There's nothing in /var/adm/messages to
> suggest any catastrophic disk problems and there's plenty of space on the
> drive.

> Any help would be greatly appreciated, as I'm stumped!

If I had to bet on the basis of that much information, I'd bet on
accidental invocation of a postmaster startup script that thinks it
should remove the postmaster.pid file before trying to launch a new
postmaster.  I've seen a lot of those, and every one of them is
dangerously broken.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgres running but no postmaster.pid
@ 2011-08-03 15:51  simon.marshall <simon.marshall@metaswitch.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: simon.marshall @ 2011-08-03 15:51 UTC (permalink / raw)
  To: pgsql-bugs

Thanks for your speedy response Tom. Seems like that is indeed what happens
elsewhere in the convoluted mess that are our backup scripts. Am
disappointed I didn't think of grepping for that myself! Too high a view of
my colleagues, now going downhill ;-)

Thanks,
Simon

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-running-but-no-postmaster-pid-tp4662510p4662703.htm...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgres running but no postmaster.pid
@ 2011-08-03 15:56  simon.marshall <simon.marshall@metaswitch.com>
  parent: simon.marshall <simon.marshall@metaswitch.com>
  0 siblings, 1 reply; 6+ messages in thread

From: simon.marshall @ 2011-08-03 15:56 UTC (permalink / raw)
  To: pgsql-bugs

In fact, looking at it further, we stop the database (only continuing if this
succeeds), copy our backup data over, remove the copied over postmaster.pid,
make some config. changes and then (again, only if all this succeeds), start
the database again, which should surely recreate postmaster.pid?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-running-but-no-postmaster-pid-tp4662510p4662719.htm...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgres running but no postmaster.pid
@ 2011-08-03 16:08  Alvaro Herrera <alvherre@commandprompt.com>
  parent: simon.marshall <simon.marshall@metaswitch.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Alvaro Herrera @ 2011-08-03 16:08 UTC (permalink / raw)
  To: simon.marshall <simon.marshall@metaswitch.com>; +Cc: pgsql-bugs

Excerpts from simon.marshall's message of mié ago 03 11:56:55 -0400 2011:
> In fact, looking at it further, we stop the database (only continuing if this
> succeeds), copy our backup data over, remove the copied over postmaster.pid,
> make some config. changes and then (again, only if all this succeeds), start
> the database again, which should surely recreate postmaster.pid?

Why would you remove the copied postmaster.pid?  Surely if the database
is stopped, it shouldn't be there in the first place.

... oh, are you copying a database that's running elsewhere?

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Postgres running but no postmaster.pid
@ 2011-08-03 16:11  simon.marshall <simon.marshall@metaswitch.com>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 0 replies; 6+ messages in thread

From: simon.marshall @ 2011-08-03 16:11 UTC (permalink / raw)
  To: pgsql-bugs

Exactly so :-) (Seems simpler and I wouldn't have thought it would be a
problem to just remove the one, very small, file after the copy)

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Postgres-running-but-no-postmaster-pid-tp4662510p4662780.htm...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2011-08-03 16:11 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 15:02 Postgres running but no postmaster.pid simon.marshall <simon.marshall@metaswitch.com>
2011-08-03 15:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2011-08-03 15:51   ` simon.marshall <simon.marshall@metaswitch.com>
2011-08-03 15:56     ` simon.marshall <simon.marshall@metaswitch.com>
2011-08-03 16:08       ` Alvaro Herrera <alvherre@commandprompt.com>
2011-08-03 16:11         ` simon.marshall <simon.marshall@metaswitch.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox