Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on' - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'
Date
Msg-id 555ED91F.8050006@iki.fi
Whole thread Raw
In response to Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'  (Matthew Kelly <mkelly@tripadvisor.com>)
Responses Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'  (Fujii Masao <masao.fujii@gmail.com>)
Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 05/22/2015 06:53 AM, Matthew Kelly wrote:
> Why anybody in practice would want hot_standby off while in standby
> mode eludes me, but these are our default values (recovery.conf was
> generated by pg_basebackup -R).

That's how you set up a cold standby system.

> It seems worth adding a hint and/or changing the error message to be
> more descriptive when in this state.  Any options about what should
> be logged before I start putting together a patch?

Yeah, might be worthwhile. Perhaps:

FATAL:  the database system is in standby mode and hot_standby is not 
enabled

Or just:

FATAL:  the database system is in cold standby mode

It would be useful to distinguish that state, where you could connect if 
hot standby was enabled, from the state where it's starting up and 
hasn't reached min-recovery-point yet and you couldn't connect even if 
hot_standby was enabled. Not sure how much signalling you'd need between 
postmaster and the startup process for that.

- Heikki



pgsql-hackers by date:

Previous
From: "Shulgin, Oleksandr"
Date:
Subject: Re: [PATCH] Generalized JSON output functions
Next
From: Piotr Gasidło
Date:
Subject: Re: [GENERAL] Strange replication problem - segment restored from archive but still requested from master