PostgreSQL Source Code git master
Functions | Variables
interrupt.h File Reference
#include <signal.h>
Include dependency graph for interrupt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 
 
 
 

Variables

PGDLLIMPORT volatile sig_atomic_t  ConfigReloadPending
 
PGDLLIMPORT volatile sig_atomic_t  ShutdownRequestPending
 

Function Documentation

ProcessMainLoopInterrupts()

void ProcessMainLoopInterrupts ( void  )

Definition at line 34 of file interrupt.c.

35{
38
40 {
41 ConfigReloadPending = false;
43 }
44
46 proc_exit(0);
47
48 /* Perform logging of memory contexts of this process */
51}
volatile sig_atomic_t LogMemoryContextPending
Definition: globals.c:41
volatile sig_atomic_t ProcSignalBarrierPending
Definition: globals.c:40
void ProcessConfigFile(GucContext context)
Definition: guc-file.l:120
@ PGC_SIGHUP
Definition: guc.h:75
volatile sig_atomic_t ShutdownRequestPending
Definition: interrupt.c:28
volatile sig_atomic_t ConfigReloadPending
Definition: interrupt.c:27
void proc_exit(int code)
Definition: ipc.c:104
void ProcessLogMemoryContextInterrupt(void)
Definition: mcxt.c:1337
void ProcessProcSignalBarrier(void)
Definition: procsignal.c:499

References ConfigReloadPending, LogMemoryContextPending, PGC_SIGHUP, proc_exit(), ProcessConfigFile(), ProcessLogMemoryContextInterrupt(), ProcessProcSignalBarrier(), ProcSignalBarrierPending, and ShutdownRequestPending.

Referenced by BackgroundWriterMain(), and WalWriterMain().

SignalHandlerForConfigReload()

void SignalHandlerForConfigReload ( SIGNAL_ARGS  )

Definition at line 61 of file interrupt.c.

62{
65}
struct Latch * MyLatch
Definition: globals.c:63
void SetLatch(Latch *latch)
Definition: latch.c:290

References ConfigReloadPending, MyLatch, and SetLatch().

Referenced by ApplyLauncherMain(), autoprewarm_main(), AutoVacLauncherMain(), AutoVacWorkerMain(), BackgroundWriterMain(), CheckpointerMain(), IoWorkerMain(), ParallelApplyWorkerMain(), PgArchiverMain(), PostgresMain(), ReplSlotSyncWorkerMain(), SetupApplyOrSyncWorker(), SysLoggerMain(), WalReceiverMain(), WalSndSignals(), WalSummarizerMain(), WalWriterMain(), and worker_spi_main().

SignalHandlerForCrashExit()

void SignalHandlerForCrashExit ( SIGNAL_ARGS  )

Definition at line 73 of file interrupt.c.

74{
75 /*
76 * We DO NOT want to run proc_exit() or atexit() callbacks -- we're here
77 * because shared memory may be corrupted, so we don't want to try to
78 * clean up our transaction. Just nail the windows shut and get out of
79 * town. The callbacks wouldn't be safe to run from a signal handler,
80 * anyway.
81 *
82 * Note we do _exit(2) not _exit(0). This is to force the postmaster into
83 * a system reset cycle if someone sends a manual SIGQUIT to a random
84 * backend. This is necessary precisely because we don't clean up our
85 * shared memory state. (The "dead man switch" mechanism in pmsignal.c
86 * should ensure the postmaster sees this as a crash, too, but no harm in
87 * being doubly sure.)
88 */
89 _exit(2);
90}

Referenced by InitPostmasterChild().

SignalHandlerForShutdownRequest()

void SignalHandlerForShutdownRequest ( SIGNAL_ARGS  )

Definition at line 104 of file interrupt.c.

105{
108}

References MyLatch, SetLatch(), and ShutdownRequestPending.

Referenced by autoprewarm_main(), AutoVacLauncherMain(), BackgroundWriterMain(), CheckpointerMain(), IoWorkerMain(), ParallelApplyWorkerMain(), PgArchiverMain(), ReplSlotSyncWorkerMain(), WalSummarizerMain(), and WalWriterMain().

Variable Documentation

ConfigReloadPending

PGDLLIMPORT volatile sig_atomic_t ConfigReloadPending
extern

Definition at line 27 of file interrupt.c.

Referenced by ApplyLauncherMain(), autoprewarm_main(), CheckpointWriteDelay(), do_autovacuum(), IoWorkerMain(), LogicalRepApplyLoop(), PostgresMain(), ProcessAutoVacLauncherInterrupts(), ProcessCheckpointerInterrupts(), ProcessMainLoopInterrupts(), ProcessParallelApplyInterrupts(), ProcessPendingWrites(), ProcessPgArchInterrupts(), ProcessSlotSyncInterrupts(), ProcessWalSummarizerInterrupts(), SignalHandlerForConfigReload(), slotsync_reread_config(), SysLoggerMain(), vacuum_delay_point(), WaitForStandbyConfirmation(), WalReceiverMain(), WalSndLoop(), WalSndWaitForWal(), and worker_spi_main().

ShutdownRequestPending

PGDLLIMPORT volatile sig_atomic_t ShutdownRequestPending
extern

Definition at line 28 of file interrupt.c.

Referenced by apw_load_buffers(), autoprewarm_main(), AutoVacLauncherMain(), CheckpointerMain(), CheckpointWriteDelay(), IoWorkerMain(), pgarch_ArchiverCopyLoop(), pgarch_MainLoop(), ProcessAutoVacLauncherInterrupts(), ProcessMainLoopInterrupts(), ProcessParallelApplyInterrupts(), ProcessSlotSyncInterrupts(), ProcessWalSummarizerInterrupts(), and SignalHandlerForShutdownRequest().

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