Fujii Masao wrote:
> On Thu, Jan 21, 2010 at 10:44 AM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
>>> If it's "standby", it's a previously-existing behavior that a "smart"
>>> shutdown doesn't work immediately during recovery. After a recovery
>>> has been completed, it would work. Of course, I agree that such a
>>> behavior should be documented.
>> Well, as long as streaming rep is running, you can't do a smart shutdown
>> ... smart shutdown seems to treat the walreciever as a client
> Even if SR is not running, as long as the startup process is running,
> we can't do a smart shutdown. It's not peculiar to SR.
Right, that's the way a standby server (= one still in recovery) has
always behaved. It has made sense in the past: it's not in the spirit of
smart shutdown to kill the WAL replay immediately. "smart" means wait
for recovery to finish, then shutdown.
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.
>> At the very least, this should be in the documentation.
> Agreed. Something like "smart shutdown is not allowed during recovery"
> should be in the following section.
It's allowed, it just doesn't do what you might expect.
In the master, smart shutdown shuts down as soon as all regular backends
are gone. It doesn't wait for the standby connections to die. In fact
they're not killed until after the shutdown checkpoint is written, so
that it gets sent to the standbys too. I think we're good there.
In response to
pgsql-hackers by date
|Next:||From: Pavel Stehule||Date: 2010-01-21 07:28:55|
|Subject: is any reason why we cannot cast from record (row) to typed row?|
|Previous:||From: Alex Hunsaker||Date: 2010-01-21 05:57:06|
|Subject: Re: attoptions|