Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
Date
Msg-id CAEepm=2XSKf_zN2MGG=3UXqLQ242pCUVGE-e7+S7Rrmkd+B36w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
List pgsql-hackers
Hi,

I'd like to disentangle two related topics.  For "I want
PostmasterIsAlive() to go faster using signals on platforms that can
support that", please see over here:


https://www.postgresql.org/message-id/flat/7261eb39-0369-f2f4-1bb5-62f3b6083b5e@iki.fi#7261eb39-0369-f2f4-1bb5-62f3b6083b5e@iki.fi

For "I want to fix all the code that ignores the WL_POSTMASTER_DEATH
event and then calls PostmasterIsAlive() every time through its loop,
or fails to detect postmaster death at all", this is the thread
(unless someone sees a reason to reentangle them).

Here's a draft patch that does that.  One contentious question is:
should you have to opt *in* to auto-exit-on-postmaster death?  Andres
opined that you should.  I actually think it's not so bad if you don't
have to do that, and instead have to opt out.  I think of it as a kind
of 'process cancellation point' or a quiet PANIC that you can opt out
of.  It's nice to remove the old boilerplate code without having to
add a new boilerplate event that you have to remember every time.  Any
other opinions?

I'm not sure if the exit(1) vs proc_exit(1) distinction is important.

-- 
Thomas Munro
http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: Bugs in TOAST handling, OID assignment and redo recovery
Next
From: Ashutosh Bapat
Date:
Subject: Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server