Re: Backends dying due to memory exhaustion--I'm stonkered

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Backends dying due to memory exhaustion--I'm stonkered
Date: 2001-01-27 03:39:05
Message-ID: 17482.980566745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Doug McNaught <doug(at)wireboard(dot)com> writes:
> From what I've seen so far, all the backends (other than the one that
> actually crashes) seem to survive the SIGTERM I send to the
> postmaster. How do I tell which one is which? The command line?

SIGTERM to the postmaster commands polite shutdown, ie, don't accept
new connections but allow existing clients to finish out their sessions.
So unless your clients are short-lived I wouldn't expect SIGTERM'ing
the postmaster to do much.

If you want to force things to happen then you should send SIGINT to
the postmaster, which in turn will SIGTERM its backends, which in
theory will abort their transactions and shut down. (No, this isn't
real consistent, but we wanted the right things to happen when a
system-wide shutdown sends SIGTERM to all the processes. Usually
you shouldn't be manually killing individual backends anyway, so the
lack of consistency in signal meaning shouldn't mean much...)

As far as telling which is which, I doubt it much matters for this.
If you've compiled with -g then the backtraces should show the queries
that each one was executing, and that's as much info as we're likely
to need.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wall 2001-01-27 03:40:52 Re: how do you run your backups?
Previous Message Mitch Vincent 2001-01-27 03:28:48 Re: postgres limitation