pg_promote() can cause busy loop - Mailing list pgsql-hackers

From Fujii Masao
Subject pg_promote() can cause busy loop
Date
Msg-id CAHGQGwEs9ROgSp+QF+YdDU+xP8W=CY1k-_Ov-d_Z3JY+to3eXA@mail.gmail.com
Whole thread Raw
Responses Re: pg_promote() can cause busy loop
List pgsql-hackers
Hi,

I found small issue in pg_promote(). If postmaster dies
while pg_promote() is waiting for the standby promotion to finish,
pg_promote() can cause busy loop. This happens because
pg_promote() does nothing when WaitLatch() detects
the postmaster death event. I think that pg_promote()
should bail out of the loop immediately in that case.

Attached is the patch for the fix.

Regards,

-- 
Fujii Masao

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unexpected "shared memory block is still in use"
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] CLUSTER command progress monitor