Skip site navigation (1) Skip section navigation (2)

Re: HS/SR and smart shutdown

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: HS/SR and smart shutdown
Date: 2010-01-21 08:35:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Heikki Linnakangas wrote:
> It's a good question if that still makes sense with Hot Standby. Perhaps
> we should redefine smart shutdown in standby mode to shut down as soon
> as all read-only connections have died.

I've advocated in the past that an escalating shutdown procedure would 
be helpful in general to have available.  Start kicking off clients with 
smart, continue to fast if there's any left, and if there's still any 
left after that (have seen COPY clients that ignore fast) disconnect 
them and go to immediate to completely kill them.  Once you've started 
the server on the road to shutdown, even with smart, you've basically 
committed to going all the way down by whatever means is available 
anyway, so why not make that more automated and easier.

If something like that were available, I could see inserting a step in 
the middle there specifically aimed at resolving this issue.  Maybe it's 
just a change to the beginning of fast shutdown, or to the end of smart 
as I think you're suggesting.  Perhaps you only get it if you do one of 
these escalating shutdowns I'm proposing, making that the preferred way 
to handle HS servers.

Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support

In response to

pgsql-hackers by date

Next:From: Matteo BeccatiDate: 2010-01-21 08:51:40
Subject: Re: WARNING: pgstat wait timeout
Previous:From: Takahiro ItagakiDate: 2010-01-21 08:34:20
Subject: Re: About "Our CLUSTER implementation is pessimal" patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group