pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
killing a hung postgres process brings down the Postgres database server on MAC OS X!
3+ messages / 3 participants
[nested] [flat]

* killing a hung postgres process brings down the Postgres database server on MAC OS X!
@ 2004-09-27 23:03  Qing Zhao <qzhao@supplyfx.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Qing Zhao @ 2004-09-27 23:03 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Kai Mildenberger <kai@supplyfx.com>

Hi, there,

We are using PostgrSQL 7.3.4 on MAC OS X  G5  with Dual prpcessors and 
8 GB RAM.

The postgreSQL server is our backend  that stores information for a 
JBoss server.
Every once in a while, we see a process (thread) that processing a 
request from
the JBoss server gets timed out.  Supposedly JBoss should clean up 
after itself when it times out.
But it did not. If we do "kill -9 pid" to get rid of the deserted 
process, it bring down the PG database
server entirely.

Is there a way to kill the dead processes/thread without really affect 
the PG server?

Thanks!

Qing Zhao




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

* Re: killing a hung postgres process brings down the Postgres database server on MAC OS X!
@ 2004-09-27 23:36  Rosser Schwarz <rosser.schwarz@gmail.com>
  parent: Qing Zhao <qzhao@supplyfx.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Rosser Schwarz @ 2004-09-27 23:36 UTC (permalink / raw)
  To: Qing Zhao <qzhao@supplyfx.com>; +Cc: pgsql-admin@postgresql.org, Kai Mildenberger <kai@supplyfx.com>

while you weren't looking, Qing Zhao wrote:

[...]

> Is there a way to kill the dead processes/thread without really affect
> the PG server?

See: http://www.postgresql.org/docs/7.3/static/postmaster-shutdown.html

I have occasionally had to kill -9 a backend, but it's never been
pleasant.  Avoid if at all possible.

/rls

-- 
:wq



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

* Re: killing a hung postgres process brings down the Postgres database server on MAC OS X!
@ 2004-09-27 23:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Qing Zhao <qzhao@supplyfx.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-09-27 23:40 UTC (permalink / raw)
  To: Qing Zhao <qzhao@supplyfx.com>; +Cc: pgsql-admin@postgresql.org, Kai Mildenberger <kai@supplyfx.com>

Qing Zhao <qzhao@supplyfx.com> writes:
> If we do "kill -9 pid" to get rid of the deserted process, it bring
> down the PG database server entirely.

It's supposed to.

> Is there a way to kill the dead processes/thread without really affect 
> the PG server?

It will time out by itself eventually (order of a couple hours probably
--- it depends on your TCP stack).  You can try a SIGINT or SIGTERM.
SIGINT is safe but may or may not cause the backend to quit.  SIGTERM
will make it quit, but I'm not prepared to guarantee that SIGTERM won't
have bad side effects.  I'd suggest waiting...

			regards, tom lane



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


end of thread, other threads:[~2004-09-27 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 23:03 killing a hung postgres process brings down the Postgres database server on MAC OS X! Qing Zhao <qzhao@supplyfx.com>
2004-09-27 23:36 ` Rosser Schwarz <rosser.schwarz@gmail.com>
2004-09-27 23:40 ` 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