Re: Excessive PostmasterIsAlive calls slow down WAL redo
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,Heikki Linnakangas
<hlinnaka@iki.fi>,pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-10T01:34:31Z
Lists: pgsql-hackers
On April 9, 2018 6:31:07 PM PDT, Alvaro Herrera <alvherre@alvh.no-ip.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.
Commits
-
Poll postmaster less frequently in recovery.
- 57dcc2ef3320 14.0 landed
-
Use signals for postmaster death on FreeBSD.
- f98b8476cd4a 12.0 landed
-
Use signals for postmaster death on Linux.
- 9f09529952ac 12.0 landed
-
Introduce a pipe between postmaster and each backend, which can be used to
- 89fd72cbf26f 9.2.0 cited