Re: smart shutdown at end of transaction (was: Default mode for shutdown)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Date: 2012-04-28 09:45:01
Message-ID: 1335606301.21838.5.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On fre, 2012-04-27 at 18:09 -0400, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > It seems we need another signal for the new mode, and the obvious
> > candidate is SIGUSR2. But what shall the mapping look like?
>
> > [Choice #1] SIGUSR2 -> slow, SIGTERM -> smart, SIGINT -> fast, SIGQUIT
> > -> immediate
> > [Choice #2] SIGTERM -> slow, SIGUSR2 -> smart, SIGINT -> fast, SIGQUIT
> > -> immediate
>
> SIGTERM needs to correspond to a fairly aggressive shutdown mode,
> since (at least on some systems) init will send that during the system
> shutdown sequence, shortly before escalating to SIGKILL.

That only happens if the postgresql init script itself didn't do a good
job. We already have this setup currently, and it doesn't seem to cause
a great deal of problems.

> If we were willing to consider wholesale breakage of any scripts that
> send these signals directly, I'd almost consider that it should be
> SIGUSR2, SIGINT, SIGTERM, SIGQUIT. But that might be more churn than
> we want. Keeping SIGTERM attached to the default/"smart" shutdown mode
> seems like a reasonable compromise.

I don't think we should change the traditional "severity" order of
signals.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-04-28 11:04:37 Re: smart shutdown at end of transaction (was: Default mode for shutdown)
Previous Message Peter Eisentraut 2012-04-28 09:39:31 Re: smart shutdown at end of transaction (was: Default mode for shutdown)