index f6d81d6e1fc19daa41e582e1ee6f96111ea61db9..94db1ec30126aca571143c4e6a7f96da3b06cb87 100644 (file)
};
/* Private functions. */
-static void HandleParallelMessage(ParallelContext *pcxt, int i, StringInfo msg);
+static void ProcessParallelMessage(ParallelContext *pcxt, int i, StringInfo msg);
static void WaitForParallelWorkersToExit(ParallelContext *pcxt);
static parallel_worker_main_type LookupParallelWorkerFunction(const char *libraryname, const char *funcname);
static void ParallelWorkerShutdown(int code, Datum arg);
*
* Note: this is called within a signal handler! All we can do is set
* a flag that will cause the next CHECK_FOR_INTERRUPTS() to invoke
- * HandleParallelMessages().
+ * ProcessParallelMessages().
*/
void
HandleParallelMessageInterrupt(void)
}
/*
- * Handle any queued protocol messages received from parallel workers.
+ * Process any queued protocol messages received from parallel workers.
*/
void
-HandleParallelMessages(void)
+ProcessParallelMessages(void)
{
dlist_iter iter;
MemoryContext oldcontext;
*/
if (hpm_context == NULL) /* first time through? */
hpm_context = AllocSetContextCreate(TopMemoryContext,
- "HandleParallelMessages",
+ "ProcessParallelMessages",
ALLOCSET_DEFAULT_SIZES);
else
MemoryContextReset(hpm_context);
initStringInfo(&msg);
appendBinaryStringInfo(&msg, data, nbytes);
- HandleParallelMessage(pcxt, i, &msg);
+ ProcessParallelMessage(pcxt, i, &msg);
pfree(msg.data);
}
else
}
/*
- * Handle a single protocol message received from a single parallel worker.
+ * Process a single protocol message received from a single parallel worker.
*/
static void
-HandleParallelMessage(ParallelContext *pcxt, int i, StringInfo msg)
+ProcessParallelMessage(ParallelContext *pcxt, int i, StringInfo msg)
{
char msgtype;
index 52f53fa12e05218fec0605670c16d79ac0186fc6..a829a055a97fe67bfac3f4dddc40d33bff5416fe 100644 (file)
#endif
/* Handle interrupt signals of startup process */
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
/*
* Pause WAL replay, if requested by a hot-standby session via
/* loop until recoveryPauseState is set to RECOVERY_NOT_PAUSED */
while (GetRecoveryPauseState() != RECOVERY_NOT_PAUSED)
{
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
if (CheckForStandbyTrigger())
return;
ResetLatch(&XLogRecoveryCtl->recoveryWakeupLatch);
/* This might change recovery_min_apply_delay. */
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
if (CheckForStandbyTrigger())
break;
@@ -3727,7 +3727,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
now = GetCurrentTimestamp();
/* Handle interrupt signals of startup process */
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
}
last_fail_time = now;
currentSource = XLOG_FROM_ARCHIVE;
@@ -4017,7 +4017,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess,
* This possibly-long loop needs to handle interrupts of startup
* process.
*/
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
}
return XLREAD_FAIL; /* not reached */
@@ -4695,7 +4695,7 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue
while (GetRecoveryPauseState() != RECOVERY_NOT_PAUSED)
{
- HandleStartupProcInterrupts();
+ ProcessStartupProcInterrupts();
if (CheckForStandbyTrigger())
{
index dfb8d068ecfe60f99efeadd4af12425eea516494..800815dfbcc3a5b635306b26c54bd626af129b32 100644 (file)
int AutovacuumLauncherPid = 0;
static Oid do_start_worker(void);
-static void HandleAutoVacLauncherInterrupts(void);
+static void ProcessAutoVacLauncherInterrupts(void);
static void AutoVacLauncherShutdown(void) pg_attribute_noreturn();
static void launcher_determine_sleep(bool canlaunch, bool recursing,
struct timeval *nap);
@@ -594,7 +594,7 @@ AutoVacLauncherMain(const void *startup_data, size_t startup_data_len)
ResetLatch(MyLatch);
- HandleAutoVacLauncherInterrupts();
+ ProcessAutoVacLauncherInterrupts();
/*
* a worker finished, or postmaster signaled failure to start a worker
@@ -742,7 +742,7 @@ AutoVacLauncherMain(const void *startup_data, size_t startup_data_len)
* Process any new interrupts.
*/
static void
-HandleAutoVacLauncherInterrupts(void)
+ProcessAutoVacLauncherInterrupts(void)
{
/* the normal shutdown case */
if (ShutdownRequestPending)
index 64524d1831bc9d38991d8abdf160e5a3fffdc6cc..a688cc5d2a17e55d4f37264bd1c5500b4928a0c8 100644 (file)
@@ -226,7 +226,7 @@ BackgroundWriterMain(const void *startup_data, size_t startup_data_len)
/* Clear any already-pending wakeups */
ResetLatch(MyLatch);
- HandleMainLoopInterrupts();
+ ProcessMainLoopInterrupts();
/*
* Do one cycle of dirty-buffer writing.
index 7acbbd3e267fa9e7296c9815f13791da8dc596f9..0e228d143a0127012776387ed1144a6321b790c8 100644 (file)
/* Prototypes for private functions */
-static void HandleCheckpointerInterrupts(void);
+static void ProcessCheckpointerInterrupts(void);
static void CheckArchiveTimeout(void);
static bool IsCheckpointOnSchedule(double progress);
static bool ImmediateCheckpointRequested(void);
@@ -359,7 +359,7 @@ CheckpointerMain(const void *startup_data, size_t startup_data_len)
*/
AbsorbSyncRequests();
- HandleCheckpointerInterrupts();
+ ProcessCheckpointerInterrupts();
if (ShutdownXLOGPending || ShutdownRequestPending)
break;
@@ -536,7 +536,7 @@ CheckpointerMain(const void *startup_data, size_t startup_data_len)
* We may have received an interrupt during the checkpoint and the
* latch might have been reset (e.g. in CheckpointWriteDelay).
*/
- HandleCheckpointerInterrupts();
+ ProcessCheckpointerInterrupts();
if (ShutdownXLOGPending || ShutdownRequestPending)
break;
}
@@ -615,7 +615,7 @@ CheckpointerMain(const void *startup_data, size_t startup_data_len)
/* Clear any already-pending wakeups */
ResetLatch(MyLatch);
- HandleCheckpointerInterrupts();
+ ProcessCheckpointerInterrupts();
if (ShutdownRequestPending)
break;
@@ -634,7 +634,7 @@ CheckpointerMain(const void *startup_data, size_t startup_data_len)
* Process any new interrupts.
*/
static void
-HandleCheckpointerInterrupts(void)
+ProcessCheckpointerInterrupts(void)
{
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
index be69e4c71365ef3fba12df0cbafa18d441e7378c..0ae9bf906ec1847aa4f63fd946f82231e7c362bf 100644 (file)
@@ -31,7 +31,7 @@ volatile sig_atomic_t ShutdownRequestPending = false;
* Simple interrupt handler for main loops of background processes.
*/
void
-HandleMainLoopInterrupts(void)
+ProcessMainLoopInterrupts(void)
{
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
*
* Normally, this handler would be used for SIGHUP. The idea is that code
* which uses it would arrange to check the ConfigReloadPending flag at
- * convenient places inside main loops, or else call HandleMainLoopInterrupts.
+ * convenient places inside main loops, or else call ProcessMainLoopInterrupts.
*/
void
SignalHandlerForConfigReload(SIGNAL_ARGS)
@@ -99,7 +99,7 @@ SignalHandlerForCrashExit(SIGNAL_ARGS)
* SIGINT or SIGTERM.
*
* ShutdownRequestPending should be checked at a convenient place within the
- * main loop, or else the main loop should call HandleMainLoopInterrupts.
+ * main loop, or else the main loop should call ProcessMainLoopInterrupts.
*/
void
SignalHandlerForShutdownRequest(SIGNAL_ARGS)
index e6cd78679ce4161a9dfc4aa8ae3e54977a781390..dbe4e1d426b4634c044c398dd9363249b91d7516 100644 (file)
@@ -147,7 +147,7 @@ static bool pgarch_archiveXlog(char *xlog);
static bool pgarch_readyXlog(char *xlog);
static void pgarch_archiveDone(char *xlog);
static void pgarch_die(int code, Datum arg);
-static void HandlePgArchInterrupts(void);
+static void ProcessPgArchInterrupts(void);
static int ready_file_comparator(Datum a, Datum b, void *arg);
static void LoadArchiveLibrary(void);
static void pgarch_call_module_shutdown_cb(int code, Datum arg);
time_to_stop = ready_to_stop;
/* Check for barrier events and config update */
- HandlePgArchInterrupts();
+ ProcessPgArchInterrupts();
/*
* If we've gotten SIGTERM, we normally just sit and do nothing until
* we'll adopt a new setting for archive_command as soon as
* possible, even if there is a backlog of files to be archived.
*/
- HandlePgArchInterrupts();
+ ProcessPgArchInterrupts();
/* Reset variables that might be set by the callback */
arch_module_check_errdetail_string = NULL;
* shutdown request is different between those loops.
*/
static void
-HandlePgArchInterrupts(void)
+ProcessPgArchInterrupts(void)
{
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
index 88eab3d0baf20a4729a77bca1e2df297b3937473..27e86cf393f6f95893a82cb23c1d6ed0d8145c5f 100644 (file)
#ifndef USE_POSTMASTER_DEATH_SIGNAL
/*
* On systems that need to make a system call to find out if the postmaster has
- * gone away, we'll do so only every Nth call to HandleStartupProcInterrupts().
+ * gone away, we'll do so only every Nth call to ProcessStartupProcInterrupts().
* This only affects how long it takes us to detect the condition while we're
* busy replaying WAL. Latch waits and similar which should react immediately
* through the usual techniques.
StartupRequestWalReceiverRestart();
}
-/* Handle various signals that might be sent to the startup process */
+/* Process various signals that might be sent to the startup process */
void
-HandleStartupProcInterrupts(void)
+ProcessStartupProcInterrupts(void)
{
#ifdef POSTMASTER_POLL_RATE_LIMIT
static uint32 postmaster_poll_count = 0;
index 4b95f6a5213408c936fcf414f6daa4929704b67f..ccba0f84e6e205116d602e5ec4728d6739a596ad 100644 (file)
@@ -145,7 +145,7 @@ int wal_summary_keep_time = 10 * HOURS_PER_DAY * MINS_PER_HOUR;
static void WalSummarizerShutdown(int code, Datum arg);
static XLogRecPtr GetLatestLSN(TimeLineID *tli);
-static void HandleWalSummarizerInterrupts(void);
+static void ProcessWalSummarizerInterrupts(void);
static XLogRecPtr SummarizeWAL(TimeLineID tli, XLogRecPtr start_lsn,
bool exact, XLogRecPtr switch_lsn,
XLogRecPtr maximum_lsn);
@@ -356,7 +356,7 @@ WalSummarizerMain(const void *startup_data, size_t startup_data_len)
MemoryContextReset(context);
/* Process any signals received recently. */
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
/* If it's time to remove any old WAL summaries, do that now. */
MaybeRemoveOldWalSummaries();
* Interrupt handler for main loop of WAL summarizer process.
*/
static void
-HandleWalSummarizerInterrupts(void)
+ProcessWalSummarizerInterrupts(void)
{
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
@@ -1016,7 +1016,7 @@ SummarizeWAL(TimeLineID tli, XLogRecPtr start_lsn, bool exact,
XLogRecord *record;
uint8 rmid;
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
/* We shouldn't go backward. */
Assert(summary_start_lsn <= xlogreader->EndRecPtr);
@@ -1503,7 +1503,7 @@ summarizer_read_local_xlog_page(XLogReaderState *state,
WALReadError errinfo;
SummarizerReadLocalXLogPrivate *private_data;
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
private_data = (SummarizerReadLocalXLogPrivate *)
state->private_data;
@@ -1541,7 +1541,7 @@ summarizer_read_local_xlog_page(XLogReaderState *state,
* current timeline, so more data might show up. Delay here
* so we don't tight-loop.
*/
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
summarizer_wait_for_wal();
/* Recheck end-of-WAL. */
XLogRecPtr oldest_lsn = InvalidXLogRecPtr;
TimeLineID selected_tli;
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
/*
* Pick a timeline for which some summary files still exist on disk,
{
WalSummaryFile *ws = lfirst(lc);
- HandleWalSummarizerInterrupts();
+ ProcessWalSummarizerInterrupts();
/* If it's not on this timeline, it's not time to consider it. */
if (selected_tli != ws->tli)
index 15a71ad684da8c7eee2b453177b4990c86e95685..0380601bcbb50fcb3738b17891457d9f1f3dfaa7 100644 (file)
@@ -239,7 +239,7 @@ WalWriterMain(const void *startup_data, size_t startup_data_len)
ResetLatch(MyLatch);
/* Process any signals received recently */
- HandleMainLoopInterrupts();
+ ProcessMainLoopInterrupts();
/*
* Do what we're here for; then, if XLogBackgroundFlush() found useful
index 268b2675caa4f61d5852703f580ab3e71873888b..d25085d35153519457fa3c2d7f098f0bb2db0528 100644 (file)
*
* Note: this is called within a signal handler! All we can do is set a flag
* that will cause the next CHECK_FOR_INTERRUPTS() to invoke
- * HandleParallelApplyMessages().
+ * ProcessParallelApplyMessages().
*/
void
HandleParallelApplyMessageInterrupt(void)
}
/*
- * Handle a single protocol message received from a single parallel apply
+ * Process a single protocol message received from a single parallel apply
* worker.
*/
static void
-HandleParallelApplyMessage(StringInfo msg)
+ProcessParallelApplyMessage(StringInfo msg)
{
char msgtype;
* Handle any queued protocol messages received from parallel apply workers.
*/
void
-HandleParallelApplyMessages(void)
+ProcessParallelApplyMessages(void)
{
ListCell *lc;
MemoryContext oldcontext;
*/
if (!hpam_context) /* first time through? */
hpam_context = AllocSetContextCreate(TopMemoryContext,
- "HandleParallelApplyMessages",
+ "ProcessParallelApplyMessages",
ALLOCSET_DEFAULT_SIZES);
else
MemoryContextReset(hpam_context);
initStringInfo(&msg);
appendBinaryStringInfo(&msg, data, nbytes);
- HandleParallelApplyMessage(&msg);
+ ProcessParallelApplyMessage(&msg);
pfree(msg.data);
}
else
index f2f75aa0f888c4fceef9d1f97f75cbe1d5120b4e..947ffb40421cb0ed31368ed3646a9529963198c4 100644 (file)
ProcessProcSignalBarrier();
if (ParallelMessagePending)
- HandleParallelMessages();
+ ProcessParallelMessages();
if (LogMemoryContextPending)
ProcessLogMemoryContextInterrupt();
if (ParallelApplyMessagePending)
- HandleParallelApplyMessages();
+ ProcessParallelApplyMessages();
}
/*
index 8811618acb74e3b0ebd194b531de5def124e1497..f37be6d56909bbba89b7df46b322f056945c88d7 100644 (file)
@@ -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);
index b488a9ac67dc43ab0d168e7bf803229f86e5e7fe..3bf4932084683c7e31ff127c3acdd5b83c94b5e3 100644 (file)
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);
index ae0f6347fc048d29d792e3cc698af937eb23fa6f..158f52255a6621db7f52db880dc86ba9d7fe523d 100644 (file)
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);
index e62abfd81477b4ec19a9529fc242879c6f2ecdd7..88912606e4d58357fb5e08df9b3e96f68f60ded2 100644 (file)
@@ -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);