Re: Controlling hot standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Controlling hot standby
Date: 2009-01-23 12:23:43
Message-ID: 1232713423.2327.1171.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.

> 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)

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?

Suggestion: bgwriter_during_recovery = on | off (on is default)
(in postgresql.conf)
If we do have this it may be deprecated in later releases if code is
stable and we have no reason to de-select this.

This second option will give us a performance boost and low failover
time, just without being able to run queries.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-01-23 12:28:37 Re: Controlling hot standby
Previous Message Simon Riggs 2009-01-23 12:09:13 Re: Controlling hot standby