Re: Nicer error when connecting to standby with hot_standby=off - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Nicer error when connecting to standby with hot_standby=off
Date
Msg-id 20210323201711.GA17188@alvherre.pgsql
Whole thread Raw
In response to Re: Nicer error when connecting to standby with hot_standby=off  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Nicer error when connecting to standby with hot_standby=off  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2021-Mar-24, Fujii Masao wrote:

> On 2021/03/24 1:20, Alvaro Herrera wrote:

> > Please note that PM_STARTUP mode is very very short-lived.  It only
> > starts happening when postmaster launches the startup process, and
> > before the startup process begins WAL replay (as changed by
> > sigusr1_handler in postmaster.c).  Once WAL replay begins, the PM status
> > changes to PM_RECOVERY.
> 
> True if archive recovery or standby server. But during crash recovery
> postmaster sits in PM_STARTUP mode. So I guess that we still see
> the log messages for PM_STARTUP lots of times.

Hmm ... true, and I had missed that this is what you had already said
upthread.  In this case, should we add a DETAIL line for this message?

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.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"La conclusión que podemos sacar de esos estudios es que
no podemos sacar ninguna conclusión de ellos" (Tanenbaum)



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: [PATCH] pg_permissions
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] pg_permissions