pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Linux: ps output shows multiple instances of PostgreSQL running on the same port
2+ messages / 2 participants
[nested] [flat]

* Linux: ps output shows multiple instances of PostgreSQL running on the same port
@ 2012-09-18 00:38 David Throckmorton <throckwork@gmail.com>
  2012-09-18 01:36 ` Re: Linux: ps output shows multiple instances of PostgreSQL running on the same port Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: David Throckmorton @ 2012-09-18 00:38 UTC (permalink / raw)
  To: pgsql-admin

Following a recent database crash, I encountered the following when doing
debug:

[root@my-db myhost]# ps -ef | grep pgsql
postgres 19643  5737  0 09:42 ?        00:00:00
/usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
postgres 19644  5737  0 09:42 ?        00:00:00
/usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
postgres 19657  5737  0 09:42 ?        00:00:00
/usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
postgres 19658  5737  0 09:42 ?        00:00:00
/usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data

pgstartup.log doesn't indicate anything about multiple instances starting,
and indicates that PID 5737 was the initial PID for the instance:

# cat pgstartup.log
2012-09-07 08:01:33 MDT [5737]

Not to mention the fact that a whole series of things would have to go
wrong to have PostgreSQL listening on the same port and different PIDs - so
many I can't even imagine it.

So I'm wondering if this has even been seen before (and/or whether I'm just
chasing windmills here).

Environment:
OS: CentOS 5 - 2.6.18-194.32.1.el5 #1 SMP Wed Jan 5 17:52:25 EST 2011
x86_64 x86_64 x86_64 GNU/Linux
PostgreSQL Version: psql (9.0.4)

Thanks.

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

* Re: Linux: ps output shows multiple instances of PostgreSQL running on the same port
  2012-09-18 00:38 Linux: ps output shows multiple instances of PostgreSQL running on the same port David Throckmorton <throckwork@gmail.com>
@ 2012-09-18 01:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2012-09-18 01:36 UTC (permalink / raw)
  To: David Throckmorton <throckwork@gmail.com>; +Cc: pgsql-admin

David Throckmorton <throckwork@gmail.com> writes:
> Following a recent database crash, I encountered the following when doing
> debug:

> [root@my-db myhost]# ps -ef | grep pgsql
> postgres 19643  5737  0 09:42 ?        00:00:00
> /usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
> postgres 19644  5737  0 09:42 ?        00:00:00
> /usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
> postgres 19657  5737  0 09:42 ?        00:00:00
> /usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data
> postgres 19658  5737  0 09:42 ?        00:00:00
> /usr/pgsql-9.0/bin/postmaster -p 5432 -D /var/lib/pgsql/9.0/data

> pgstartup.log doesn't indicate anything about multiple instances starting,
> and indicates that PID 5737 was the initial PID for the instance:

Almost certainly, these are just regular postmaster child processes.
I'm not sure why "ps" is showing you the original postmaster command
line rather than the usual modified process title --- that's a known
behavior on some Unixen but I've not heard of it on Linux.  Are you
using a nonstandard flavor of "ps"?

Also, is process 5737 still around?  If it was dead, I would rather
expect ps to show the orphaned processes as children of pid 1.
If it is around, what is ps showing as its command line?  Can you
connect to the database?

			regards, tom lane




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


end of thread, other threads:[~2012-09-18 01:36 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18 00:38 Linux: ps output shows multiple instances of PostgreSQL running on the same port David Throckmorton <throckwork@gmail.com>
2012-09-18 01:36 ` Tom Lane <tgl@sss.pgh.pa.us>

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