Re: Excessive PostmasterIsAlive calls slow down WAL redo

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-18T05:04:17Z
Lists: pgsql-hackers

Attachments

On Wed, Apr 11, 2018 at 10:22 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> On Tue, Apr 10, 2018 at 12:53 PM, Andres Freund <andres@anarazel.de>
>> wrote:
>>> That person said he'd work on adding an equivalent of linux'
>>> prctl(PR_SET_PDEATHSIG) to FreeBSD.

Here is an implementation of Andres's idea for Linux, and also for
patched FreeBSD (for later if/when that lands).  Do you think this
makes sense Heikki?  I am planning to add this to the next CF.

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

Commits

  1. Poll postmaster less frequently in recovery.

  2. Use signals for postmaster death on FreeBSD.

  3. Use signals for postmaster death on Linux.

  4. Introduce a pipe between postmaster and each backend, which can be used to