Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: hlinnaka(at)iki(dot)fi
Cc: Matthew Kelly <mkelly(at)tripadvisor(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add a hint when postgresql.conf hot_standby = 'off' and recovery.conf standby = 'on'
Date: 2015-05-22 15:21:50
Message-ID: 5566.1432308110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> On 05/22/2015 06:53 AM, Matthew Kelly 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

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

Another angle worth considering is whether PQping can or should
distinguish this state from "database is fully up". (I do not
recall what it does right now.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-22 15:48:18 Re: Run pgindent now?
Previous Message Tom Lane 2015-05-22 15:09:32 Re: Run pgindent now?