Re: Excessive PostmasterIsAlive calls slow down WAL redo

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Excessive PostmasterIsAlive calls slow down WAL redo
Date: 2018-07-11 08:10:14
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 11/07/18 04:16, Thomas Munro wrote:
> On Tue, Jul 10, 2018 at 11:39 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>> I don't have a FreeBSD machine at hand, so I didn't try fixing that
>> patch.
> I updated the FreeBSD version to use the header test approach you
> showed, and pushed that too. FWIW the build farm has some FreeBSD
> animals with and without PROC_PDEATHSIG_CTL.


> I suppose it's possibly that we might want to reconsider the choice of
> signal in the future (SIGINFO or SIGPWR).

We could reuse SIGUSR1 for this. If we set the flag in SIGUSR1 handler,
then some PostmasterIsAlive() calls would take the slow path
unnecessarily, but it would probably be OK. The slow path isn't that
slow. But using SIGINFO/SIGPWR seems fine.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo Nagata 2018-07-11 09:04:08 Allow to specify a index name as ANALYZE parameter
Previous Message Haribabu Kommi 2018-07-11 08:00:37 Re: Libpq support to connect to standby server as priority