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

From: James Coleman <jtc331(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(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-23 16:48:32
Message-ID: CAAaqYe_E1_gdQZp8JvTGskpuq_uXvRMFhUTK8oBK4RWv4F7+_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 23, 2021 at 12:34 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > However, for this one
>
> > + case CAC_NOTCONSISTENT:
> > + if (EnableHotStandby)
> > + ereport(FATAL,
> > + (errcode(ERRCODE_CANNOT_CONNECT_NOW),
> > + errmsg("the database system is not accepting connections"),
> > + errdetail("Consistent recovery state has not been yet reached.")));
>
> > Maybe it makes sense to say "... is not accepting connections *yet*".
>
> +1, but I think "... is not yet accepting connections" is slightly
> better style.

All right, see attached v8.

James Coleman

Attachment Content-Type Size
v8-0001-Improve-standby-connection-denied-error-message.patch application/octet-stream 2.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2021-03-23 17:08:23 Re: new release pspg
Previous Message Robert Haas 2021-03-23 16:46:40 Re: making update/delete of inheritance trees scale better