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

Re: HS/SR and smart shutdown

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HS/SR and smart shutdown
Date: 2010-01-31 17:27:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Jan 30, 2010 at 01:05, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Jan 29, 2010 at 7:01 PM, Josh Berkus <josh(at)agliodbs(dot)com> 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.
>>> It's clear that "smart" shutdown doesn't work while something is active.
>>> Recovery is "active" and so we shouldn't shutdown. It makes sense, it
>>> works like this already, lets leave it. Document it if needed.
>> I don't think it's clear, or intuitive for users.  In SR, recovery is
>> *never* done, so smart shutdown never completes (even if the master is
>> shut down, when I tested it).  This is particularly an important issue
>> when you consider that some/many service and init scripts only use smart
>> shutdown ... so we'll get a lot of "bug reports" of "posgresql does not
>> shut down".
> Absolutely agreed.  The existing smart shutdown behavior makes sense
> from a certain point of view, but it doesn't seem very... what's the
> word I'm looking for?... smart.

How about we change it so it's not the default anymore?

The fact is that for most applications, it's just broken. Consider any
application that uses connection pooling, which happens to be what we
recommend people to do. A smart shutdown will never shut that server
down. But it will make it not accept new connections. Which is
probably the worst possible behavior in most cases.

 Magnus Hagander

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-31 17:33:13
Subject: Re: odd output in initdb
Previous:From: Magnus HaganderDate: 2010-01-31 17:24:39
Subject: Re: odd output in initdb

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