Re: Excessive PostmasterIsAlive calls slow down WAL redo
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndquadrant.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-05T13:50:24Z
Lists: pgsql-hackers
On 5 April 2018 at 08:23, Heikki Linnakangas <hlinnaka@iki.fi> wrote: > That seems like an utter waste of time. I'm almost inclined to call that a > performance bug. As a straightforward fix, I'd suggest that we call > HandleStartupProcInterrupts() in the WAL redo loop, not on every record, but > only e.g. every 32 records. That would make the main redo loop less > responsive to shutdown, SIGHUP, or postmaster death, but that seems OK. > There are also calls to HandleStartupProcInterrupts() in the various other > loops, that wait for new WAL to arrive or recovery delay, so this would only > affect the case where we're actively replaying records. +1 -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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