summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorHeikki Linnakangas2025-03-05 14:22:26 +0000
committerHeikki Linnakangas2025-03-05 14:22:26 +0000
commit635f580120b99f6df71d7c12749b22acde61c5ad (patch)
treec9426b1738ae53c81ba419aa5f2dafff0ba6be32 /src/include
parentf4e53e10b6ce0eedeb98caa4356facb47c7bb9cb (diff)
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]
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/parallel.h2
-rw-r--r--src/include/postmaster/interrupt.h2
-rw-r--r--src/include/postmaster/startup.h2
-rw-r--r--src/include/replication/logicalworker.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/include/access/parallel.h b/src/include/access/parallel.h
index 8811618acb7..f37be6d5690 100644
--- a/src/include/access/parallel.h
+++ b/src/include/access/parallel.h
@@ -71,7 +71,7 @@ extern void DestroyParallelContext(ParallelContext *pcxt);
extern bool ParallelContextActive(void);
extern void HandleParallelMessageInterrupt(void);
-extern void HandleParallelMessages(void);
+extern void ProcessParallelMessages(void);
extern void AtEOXact_Parallel(bool isCommit);
extern void AtEOSubXact_Parallel(bool isCommit, SubTransactionId mySubId);
extern void ParallelWorkerReportLastRecEnd(XLogRecPtr last_xlog_end);
diff --git a/src/include/postmaster/interrupt.h b/src/include/postmaster/interrupt.h
index b488a9ac67d..3bf49320846 100644
--- a/src/include/postmaster/interrupt.h
+++ b/src/include/postmaster/interrupt.h
@@ -24,7 +24,7 @@
extern PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending;
extern PGDLLIMPORT volatile sig_atomic_t ShutdownRequestPending;
-extern void HandleMainLoopInterrupts(void);
+extern void ProcessMainLoopInterrupts(void);
extern void SignalHandlerForConfigReload(SIGNAL_ARGS);
extern void SignalHandlerForCrashExit(SIGNAL_ARGS);
extern void SignalHandlerForShutdownRequest(SIGNAL_ARGS);
diff --git a/src/include/postmaster/startup.h b/src/include/postmaster/startup.h
index ae0f6347fc0..158f52255a6 100644
--- a/src/include/postmaster/startup.h
+++ b/src/include/postmaster/startup.h
@@ -25,7 +25,7 @@
extern PGDLLIMPORT int log_startup_progress_interval;
-extern void HandleStartupProcInterrupts(void);
+extern void ProcessStartupProcInterrupts(void);
extern void StartupProcessMain(const void *startup_data, size_t startup_data_len) pg_attribute_noreturn();
extern void PreRestoreCommand(void);
extern void PostRestoreCommand(void);
diff --git a/src/include/replication/logicalworker.h b/src/include/replication/logicalworker.h
index e62abfd8147..88912606e4d 100644
--- a/src/include/replication/logicalworker.h
+++ b/src/include/replication/logicalworker.h
@@ -24,7 +24,7 @@ extern bool IsLogicalWorker(void);
extern bool IsLogicalParallelApplyWorker(void);
extern void HandleParallelApplyMessageInterrupt(void);
-extern void HandleParallelApplyMessages(void);
+extern void ProcessParallelApplyMessages(void);
extern void LogicalRepWorkersWakeupAtCommit(Oid subid);