Re: pg_promote() can cause busy loop

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_promote() can cause busy loop
Date: 2019-09-05 07:03:22
Message-ID: CAHGQGwGzueOCRXHAa=kTGfxMMvQzWVB19Qj0_E4GUEtyuz=L+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 5, 2019 at 11:10 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Thu, Sep 05, 2019 at 10:53:19AM +0900, Fujii Masao wrote:
> > It's ok to use PG_RETURN_BOOL(false) instead of breaking out of the loop
> > in that case. Which would make the code simpler.
>
> Okay. I would have done so FWIW.
>
> > But I don't think it's worth warning about postmaster death here
> > because a backend will emit FATAL message like "terminating connection
> > due to unexpected postmaster exit" in secure_read() after
> > pg_promote() returns false.
>
> Good point, that could be equally confusing.

So, barring any objection, I will commit the attached patch.

Regards,

--
Fujii Masao

Attachment Content-Type Size
pg_promote_and_postmaster_death_v2.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-09-05 07:09:26 Re: enhance SPI to support EXECUTE commands
Previous Message Michael Paquier 2019-09-05 06:52:48 Re: refactoring - share str2*int64 functions