Re: [HACKERS] kqueue - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [HACKERS] kqueue
Date
Msg-id CA+hUKGKhEibUEzJ0WRQr=s8C6qYQ=Fhzd60q0+41WoZmvye6oA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] kqueue  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Fri, Dec 20, 2019 at 1:26 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Fri, Dec 20, 2019 at 12:41 PM Rui DeSousa <rui@crazybean.net> wrote:
> > PostgreSQL 11

BTW, PostgreSQL 12 has an improvement that may be relevant for your
case: it suppresses a bunch of high frequency reads on the "postmaster
death" pipe in some scenarios, mainly the streaming replica replay
loop (if you build on a system new enough to have PROC_PDEATHSIG_CTL,
namely FreeBSD 11.2+, it doesn't bother reading the pipe unless it's
received a signal).  That pipe is inherited by every process and
included in every poll() set.  The kqueue patch doesn't even bother to
add it to the wait event set, preferring to use an EVFILT_PROC event,
so in theory we could get rid of the death pipe completely on FreeBSD
and rely on EVFILT_PROC (sleeping) and PDEATHSIG (while awake), but I
wouldn't want to make the code diverge from the Linux code too much,
so I figured we should leave the pipe in place but just avoid
accessing it when possible, if that makes sense.



pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: More issues with expressions always false (no patch)
Next
From: "Smith, Peter"
Date:
Subject: RE: Proposal: Add more compile-time asserts to exposeinconsistencies.