Re: Nicer error when connecting to standby with hot_standby=off

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, James Coleman <jtc331(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, David Steele <david(at)pgmasters(dot)net>, David Zhang <david(dot)zhang(at)highgo(dot)ca>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Nicer error when connecting to standby with hot_standby=off
Date: 2021-03-24 09:55:05
Message-ID: dfd1c88a-f594-5d96-32cf-b6382b7ba8f5@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/03/24 16:59, Alvaro Herrera wrote:
> On 2021-Mar-24, Fujii Masao wrote:
>
>> On 2021/03/24 5:59, Tom Lane wrote:
>>> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>>>> FATAL: the database system is starting up
>>>> DETAIL: WAL is being applied to recover from a system crash.
>>>> or
>>>> DETAIL: The system is applying WAL to recover from a system crash.
>>>> or
>>>> DETAIL: The startup process is applying WAL to recover from a system crash.
>>>
>>> I don't think the postmaster has enough context to know if that's
>>> actually true. It just launches the startup process and waits for
>>> results. If somebody saw this during a normal (non-crash) startup,
>>> they'd be justifiably alarmed.
>>
>> Yes, so logging "the database system is starting up" seems enough to me.
>
> No objection.

Thanks! So I changed the message reported at PM_STARTUP to that one,
based on v8 patch that James posted upthread. I also ran pgindent for
the patch. Attached is the updated version of the patch.

Barring any objection, I will commit this.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
v9-0001-Improve-standby-connection-denied-error-message.patch text/plain 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2021-03-24 09:56:29 Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
Previous Message Dilip Kumar 2021-03-24 09:40:14 Re: [HACKERS] Custom compression methods