Re: Controlling hot standby - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Controlling hot standby
Date
Msg-id 4979B7F5.7090308@enterprisedb.com
Whole thread Raw
In response to Re: Controlling hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Controlling hot standby  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs wrote:
> On Fri, 2009-01-23 at 10:35 +0200, Heikki Linnakangas wrote:
>> As the patch stands, there's no way to disable hot standby. The server 
>> always opens for read-only connections as soon as it can. That might not 
>> be what you want.
>>
>> I think we need a GUC to enable/disable hot standby. It would become 
>> handy if the unimaginable happens and there's a bug in the hot standby 
>> code that prevents a server from recovering.
> 
> Currently recovery processing is only active during archive recovery,
> never during crash recovery, for the above reason.

Oh, ok. Is the bgwriter still launched in crash recovery, and do we 
start accepting connections as soon as the replay finishes, before the 
first checkpoint is finished?

>> I think we need a GUC to enable/disable hot standby. 
> 
> I presume you mean something that will stop us keeping track of
> snapshots and preventing users from connecting?
> 
> Suggestion: hot_standby = on | off (on is default)
> (in recovery.conf)

Right.

> Would that include starting the bgwriter during recovery? Or should be a
> separate boolean? If needed, should this be in postgresql.conf or in
> recovery.conf?

I don't think that's necessary.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Controlling hot standby
Next
From: Teodor Sigaev
Date:
Subject: Re: [PATCHES] GIN improvements