Re: Controlling hot standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Controlling hot standby
Date
Msg-id 1233571533.4500.94.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Controlling hot standby  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, 2009-01-23 at 12:09 -0500, Robert Haas wrote:
> > Could also be something like "allow_connections_during_recovery".
> 
> +1 (should we say "continuous recovery?")

Rather than a boolean, it seems more useful to specify a parameter that
has some additional usefulness, if we are going to have one at all.

max_recovery_connections = 0+

If you set it to 0 then we will turn off hot standby. Default value
would be to set it to same value as max_connections, though can be
overridden if specifically set.

This then allows us to control the number of users who get access to the
standby, which we might conceivably want to be smaller than
max_connections because recovery takes resources also.

It also means we don't have a specific "name" for this feature, we just
say what we want: connections.

The patch currently sets these parameters in recovery.conf. The above
change would only work if set via postgresql.conf, since it must be read
by the postmaster. So I would suggest that we put both
max_recovery_connections and max_standby_delay into postgresql.conf,
which then allows them both to be changed as recovery progresses.

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



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: why declare arg as a array in FunctionCallInfoData structure
Next
From: Peter Eisentraut
Date:
Subject: Re: parallel restore