git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: f4e53e1) | patch
Rename some signal and interrupt handling functions for consistency
Wed, 5 Mar 2025 14:22:26 +0000 (16:22 +0200)
Wed, 5 Mar 2025 14:22:26 +0000 (16:22 +0200)
commit 635f580120b99f6df71d7c12749b22acde61c5ad
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 <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/8a384b26-1499-41f6-be33-64b801fb98b8@iki.fi
16 files changed:
src/backend/access/transam/parallel.c diff | blob | blame | history
src/backend/access/transam/xlogrecovery.c diff | blob | blame | history
src/backend/postmaster/autovacuum.c diff | blob | blame | history
src/backend/postmaster/bgwriter.c diff | blob | blame | history
src/backend/postmaster/checkpointer.c diff | blob | blame | history
src/backend/postmaster/interrupt.c diff | blob | blame | history
src/backend/postmaster/pgarch.c diff | blob | blame | history
src/backend/postmaster/startup.c diff | blob | blame | history
src/backend/postmaster/walsummarizer.c diff | blob | blame | history
src/backend/postmaster/walwriter.c diff | blob | blame | history
src/backend/replication/logical/applyparallelworker.c diff | blob | blame | history
src/backend/tcop/postgres.c diff | blob | blame | history
src/include/access/parallel.h diff | blob | blame | history
src/include/postmaster/interrupt.h diff | blob | blame | history
src/include/postmaster/startup.h diff | blob | blame | history
src/include/replication/logicalworker.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /