Re: Excessive PostmasterIsAlive calls slow down WAL redo

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Heikki Linnakangas <hlinnaka(at)iki(dot)fi>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Excessive PostmasterIsAlive calls slow down WAL redo
Date: 2018-04-10 01:34:31
Message-ID: E5042BE5-F72C-4DB5-A15F-DDBBB93BCD3E@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On April 9, 2018 6:31:07 PM PDT, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>Andres Freund wrote:
>
>> Another approach, that's simpler to implement, is to simply have a
>> second selfpipe, just for WL_POSTMASTER_DEATH.
>
>Would it work to use this second pipe, to which each child writes a
>byte
>that postmaster never reads, and then rely on SIGPIPE when postmaster
>dies? Then we never need to do a syscall.

I'm not following, could you expand on what you're suggesting? Note that you do not get SIGPIPE for already buffered writes. Which syscall can we avoid?

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-04-10 01:36:19 Re: Excessive PostmasterIsAlive calls slow down WAL redo
Previous Message Kyotaro HORIGUCHI 2018-04-10 01:34:27 Re: Boolean partitions syntax