Re: Why has postmaster shutdown gotten so slow? - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Why has postmaster shutdown gotten so slow?
Date
Msg-id 402292D8.8050903@Yahoo.com
Whole thread Raw
In response to Re: Why has postmaster shutdown gotten so slow?  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Why has postmaster shutdown gotten so slow?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Jan Wieck wrote:

> Tom Lane wrote:
> 
>> Shutdown of an idle postmaster used to take about two or three seconds
>> (mostly due to the sync/sleep(2)/sync in md_sync).  For the last couple
>> of days it's taking more like a dozen seconds.  I presume somebody broke
>> something, but I'm unsure whether to pin the blame on bgwriter or
>> Windows changes.  Anyone care to fess up?
> 
> I guess it could well be the bgwriter, which when having nothing to do 
> at all is sleeping for 10 seconds. Not sure, will check.

I checked the background writer for this and I can not reproduce the 
behaviour. If the bgwriter had zero blocks to write it does PG_USLEEP 
for 10 seconds, which on Unix is done by select() and that is correctly 
interrupted when the postmaster sends it the term signal on shutdown.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-hackers by date:

Previous
From: Austin Gonyou
Date:
Subject: Re: PITR Dead horse?
Next
From: evgen
Date:
Subject: Re: Recursive queries?