postgresql/src/backend/postmaster
Thomas Munro 57dcc2ef33 Poll postmaster less frequently in recovery.
Since commits 9f095299 and f98b8476 we don't poll the postmaster
pipe at all during crash recovery on Linux and FreeBSD, but on other
operating systems we were still doing it for every WAL record.  Do it
less frequently on operating systems where system calls are required, at
the cost of delaying exit a bit after postmaster death.  This avoids
expensive system calls reported to slow down CPU-bound recovery by as
much as 10-30%.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CA%2BhUKGK1607VmtrDUHQXrsooU%3Dap4g4R2yaoByWOOA3m8xevUQ%40mail.gmail.com
Discussion: https://postgr.es/m/7261eb39-0369-f2f4-1bb5-62f3b6083b5e@iki.fi
2021-03-12 19:45:42 +13:00
..
autovacuum.c Use errmsg_internal for debug messages 2021-02-17 11:33:25 +01:00
bgworker.c Use SIGURG rather than SIGUSR1 for latches. 2021-03-01 12:44:12 +13:00
bgwriter.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
checkpointer.c Send statistics collected during shutdown checkpoint to the stats collector. 2021-03-12 14:23:00 +09:00
fork_process.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
interrupt.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
Makefile Partially deduplicate interrupt handling for background processes. 2019-12-17 13:14:28 -05:00
pgarch.c Update copyright for 2021 2021-01-02 13:06:25 -05:00
pgstat.c Add condition variable for walreceiver shutdown. 2021-03-12 19:45:42 +13:00
postmaster.c Remove server and libpq support for old FE/BE protocol version 2. 2021-03-04 10:45:55 +02:00
startup.c Poll postmaster less frequently in recovery. 2021-03-12 19:45:42 +13:00
syslogger.c Use errmsg_internal for debug messages 2021-02-17 11:33:25 +01:00
walwriter.c Force to send remaining WAL stats to the stats collector at walwriter exit. 2021-03-12 13:29:59 +09:00