On 05/22/2015 12:22 AM, Heikki Linnakangas wrote:
>> 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
Warm Standby is what we called it in the past, so I think we should be
consistent. Otherwise +1.
The additional benefit of this is that it would (hopefully) allow us to
distinguish between a warm standby which was still reading its own xlogs
(i.e. in crash recovery) and a warm standby which was using the
restore_command (i.e. standby-ing). For that reason, it would be ideal
if the new message only displayed once the restore_command starts being
used.
That is:
Cold Standby == DB Snapshot and a huge folder of WAL files (i.e. Barman)
Warm Standby == hot_standby=off, recoveryconf.standby=on
Hot Standby == hot_standby=on, recoveryconf.standby=on
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com