Re: [RFC] Should we fix postmaster to avoid slow shutdown? - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Date
Msg-id 0A3221C70F24FB45833433255569204D1F5F2BAC@G01JPEXMBYT05
Whole thread Raw
In response to Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Re: [RFC] Should we fix postmaster to avoid slow shutdown?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Tom Lane
> Allowing SIGQUIT to prompt fast shutdown of the stats collector seems sane,
> though.  Try to make sure it doesn't leave partly-written stats files
> behind.

The attached patch based on HEAD does this.  I'd like this to be back-patched because one of our important customers
uses9.2. 

I didn't remove partially written stat files on SIGQUIT for the following reasons.  Is this OK?

1. The recovery at the next restart will remove the stat files.
2. SIGQUIT processing should be as fast as possible.
3. If writing stats files took long due to the OS page cache flushing, removing files might be forced to wait likewise.


> FWIW, I'm pretty much -1 on messing with the timing of the socket close
> actions.  I broke that once within recent memory, so maybe I'm gun-shy,
> but I think that the odds of unpleasant side effects greatly outweigh any
> likely benefit there.

Wasn't it related to TouchSocketFiles()?  Can I see the discussion on this ML?  I don't see any problem looking at the
code...

Regards
Takayuki Tsunakawa




Attachment

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: sloppy handling of pointers
Next
From: Pavel Stehule
Date:
Subject: Re: Detect supported SET parameters when pg_restore is run