Re: when the startup process doesn't (logging startup delays)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, simon(dot)riggs(at)enterprisedb(dot)com, thomas(dot)munro(at)gmail(dot)com, nitinjadhavpostgres(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, alvherre(at)alvh(dot)no-ip(dot)org, pryzby(at)telsasoft(dot)com, michael(at)paquier(dot)xyz, andres(at)anarazel(dot)de, sfrost(at)snowman(dot)net, magnus(at)hagander(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: when the startup process doesn't (logging startup delays)
Date: 2023-02-02 20:59:11
Message-ID: CA+TgmoYqesbXKh64YynScwg_7A60B1LrQ_9CMM+7jb1WB611vA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 22, 2022 at 6:05 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> If we place just the Assert(!StandbyMode); in
> enable_startup_progress_timeout(), it fails for
> begin_startup_progress_phase() in ResetUnloggedRelations() because the
> InitWalRecovery(), that sets StandbyMode to true, is called before
> ResetUnloggedRelations() . However, with the if (StandbyMode) {
> return; }, we fail to report progress of ResetUnloggedRelations() in a
> standby, which isn't a good idea at all because we only want to
> disable the timeout during the recovery's main loop.

Ugh. Well, in that case, I guess my vote is to forget about this whole
Assert business and just commit what you had in v4. Does that work for
you?

Protecting against specifically the situation where we're in the
standby's main redo apply loop is not really what I had in mind here,
but this is already sort of weirdly complicated-looking, and making it
more weirdly complicated-looking to achieve the kind of protection
that I had in mind doesn't really seem worth it.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-02-02 21:14:54 Re: Weird failure with latches in curculio on v15
Previous Message Nikolay Samokhvalov 2023-02-02 20:56:47 Re: Amcheck verification of GiST and GIN