pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Poll postmaster less frequently in recovery.
Date: Fri, 12 Mar 2021 06:55:21 +0000
Message-ID: <E1lKbhh-00015H-I0@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/57dcc2ef3320de3e1aef6f668601e6ad2bdf88c4

Modified Files
--------------
src/backend/postmaster/startup.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)



Message-ID: <E1lKbhh-00015H-I0@gemulon.postgresql.org>
Permalink:  ../E1lKbhh-00015H-I0@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lKbhh-00015H-I0@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Poll postmaster less frequently in recovery.
  In-Reply-To: <E1lKbhh-00015H-I0@gemulon.postgresql.org>
  References: <E1lKbhh-00015H-I0@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox