pgsql: Move interrupt-handling code into subroutines.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move interrupt-handling code into subroutines.
Date: 2019-12-17 17:59:57
Message-ID: E1ihH8X-0005rL-4F@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-12-17 18:09:00 pgsql: Use PostgresSigHupHandler in more places.
Previous Message Amit Kapila 2019-12-17 04:24:30 pgsql: Change overly strict Assert in TransactionGroupUpdateXidStatus.