public inbox for [email protected]  
help / color / mirror / Atom feed
From: Heikki Linnakangas <[email protected]>
To: [email protected]
Subject: pgsql: Rename some signal and interrupt handling functions for consiste
Date: Wed, 05 Mar 2025 14:30:16 +0000
Message-ID: <[email protected]> (raw)

Rename some signal and interrupt handling functions for consistency

The usual pattern for handling a signal is that the signal handler
sets a flag and calls SetLatch(MyLatch), and CHECK_FOR_INTERRUPTS() or
other code that is part of a wait loop calls another function to deal
with it. The naming of the functions involved was a bit inconsistent,
however. CHECK_FOR_INTERRUPTS() calls ProcessInterrupts() to do the
heavy-lifting, but the analogous functions in aux processes were
called HandleMainLoopInterrupts(), HandleStartupProcInterrupts(),
etc. Similarly, most subroutines of ProcessInterrupts() were called
Process*(), but some were called Handle*().

To make things less confusing, rename all the functions that are part
of the overall signal/interrupt handling system but are not executed
in a signal handler to e.g. ProcessSomething(), rather than
HandleSomething(). The "Process" prefix is now consistently used in
the non-signal-handler functions, and the "Handle" prefix in functions
that are part of signal handlers, except for some completely unrelated
functions that clearly have nothing to do with signal or interrupt
handling.

Reviewed-by: Nathan Bossart <[email protected]>
Discussion: https://www.postgresql.org/message-id/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/635f580120b99f6df71d7c12749b22acde61c5ad

Modified Files
--------------
src/backend/access/transam/parallel.c                 | 16 ++++++++--------
src/backend/access/transam/xlogrecovery.c             | 12 ++++++------
src/backend/postmaster/autovacuum.c                   |  6 +++---
src/backend/postmaster/bgwriter.c                     |  2 +-
src/backend/postmaster/checkpointer.c                 | 10 +++++-----
src/backend/postmaster/interrupt.c                    |  6 +++---
src/backend/postmaster/pgarch.c                       |  8 ++++----
src/backend/postmaster/startup.c                      |  6 +++---
src/backend/postmaster/walsummarizer.c                | 16 ++++++++--------
src/backend/postmaster/walwriter.c                    |  2 +-
src/backend/replication/logical/applyparallelworker.c | 12 ++++++------
src/backend/tcop/postgres.c                           |  4 ++--
src/include/access/parallel.h                         |  2 +-
src/include/postmaster/interrupt.h                    |  2 +-
src/include/postmaster/startup.h                      |  2 +-
src/include/replication/logicalworker.h               |  2 +-
16 files changed, 54 insertions(+), 54 deletions(-)



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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Rename some signal and interrupt handling functions for consiste
  In-Reply-To: <[email protected]>

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

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