Re: [RFC] Should we fix postmaster to avoid slow shutdown?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Date: 2016-09-20 14:58:11
Message-ID: CA+TgmoY8qQ9AEGy6XgZSLggJyjKk+Gkn4vOnTW3vfHXS=wWoSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 20, 2016 at 2:20 AM, Tsunakawa, Takayuki
<tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote:
> There's no apparent evidence to indicate the cause, but I could guess a few reasons. What do you think these are correct and should fix PostgreSQL? (I think so)

I think that we shouldn't start changing things based on guesses about
what the problem is, even if they're fairly smart guesses. The thing
to do would be to construct a test rig, crash the server repeatedly,
and add debugging instrumentation to figure out where the time is
actually going.

I do think your theory about the stats collector might be worth
pursuing. It seems that the stats collector only responds to SIGQUIT,
ignoring SIGTERM. Making it do a clean shutdown on SIGTERM and a fast
exit on SIGQUIT seems possibly worthwhile.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-20 14:58:17 Re: Parallel sec scan in plpgsql
Previous Message Robert Haas 2016-09-20 14:46:39 Re: [PATCH] Transaction traceability - txid_status(bigint)