Re: Excessive PostmasterIsAlive calls slow down WAL redo

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
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:57:23
Message-ID: 20180410015723.3fxcaj2x23w26oox@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund wrote:
>
> On April 9, 2018 6:31:07 PM PDT, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:

> >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?

Ah. I was thinking we'd get SIGPIPE from the byte sent at the start, as
soon as the kernel saw that postmaster abandoned the fd by dying.
Scratch that then.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-04-10 01:59:03 Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Previous Message Craig Ringer 2018-04-10 01:54:30 Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS