pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move interrupt-handling code into subroutines.
Date: Tue, 17 Dec 2019 17:59:57 +0000
Message-ID: <E1ihH8X-0005rL-4F@gemulon.postgresql.org> (raw)

Move interrupt-handling code into subroutines.

Some auxiliary processes, as well as the autovacuum launcher,
have interrupt handling code directly in their main loops.
Try to abstract things a little better by moving it into
separate functions.

This doesn't make any functional difference, and leaves
in place relatively large differences among processes in how
interrupts are handled, but hopefully it at least makes it
easier to see the commonalities and differences across
process types.

Patch by me, reviewed by Andres Freund and Daniel Gustafsson.

Discussion: http://postgr.es/m/CA+TgmoZwDk=BguVDVa+qdA6SBKef=PKbaKDQALTC_9qoz1mJqg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5910d6c7e311f0b14e3d3cb9ce3597c01d3a3cde

Modified Files
--------------
src/backend/postmaster/autovacuum.c   | 72 ++++++++++++++++++++++-------------
src/backend/postmaster/bgwriter.c     | 42 ++++++++++++--------
src/backend/postmaster/checkpointer.c | 71 +++++++++++++++++++---------------
src/backend/postmaster/walwriter.c    | 34 ++++++++++-------
4 files changed, 133 insertions(+), 86 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1ihH8X-0005rL-4F@gemulon.postgresql.org>
Permalink:  ../E1ihH8X-0005rL-4F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ihH8X-0005rL-4F@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: rhaas@postgresql.org
  Subject: Re: pgsql: Move interrupt-handling code into subroutines.
  In-Reply-To: <E1ihH8X-0005rL-4F@gemulon.postgresql.org>
  References: <E1ihH8X-0005rL-4F@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