PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/xlog.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/interrupt.h"
#include "postmaster/startup.h"
#include "storage/ipc.h"
#include "storage/latch.h"
#include "storage/pmsignal.h"
#include "storage/procsignal.h"
#include "storage/standby.h"
#include "utils/guc.h"
#include "utils/timeout.h"
Go to the source code of this file.
Functions | |
static void | StartupProcTriggerHandler (SIGNAL_ARGS) |
static void | StartupProcSigHupHandler (SIGNAL_ARGS) |
static void | StartupProcShutdownHandler (SIGNAL_ARGS) |
static void | StartupRereadConfig (void) |
void | HandleStartupProcInterrupts (void) |
void | StartupProcessMain (void) |
void | PreRestoreCommand (void) |
void | PostRestoreCommand (void) |
bool | IsPromoteSignaled (void) |
void | ResetPromoteSignaled (void) |
Variables | |
static volatile sig_atomic_t | got_SIGHUP = false |
static volatile sig_atomic_t | shutdown_requested = false |
static volatile sig_atomic_t | promote_signaled = false |
static volatile sig_atomic_t | in_restore_command = false |
void HandleStartupProcInterrupts | ( | void | ) |
Definition at line 135 of file startup.c.
References got_SIGHUP, IsUnderPostmaster, PostmasterIsAlive, proc_exit(), ProcessProcSignalBarrier(), ProcSignalBarrierPending, shutdown_requested, and StartupRereadConfig().
Referenced by recoveryApplyDelay(), recoveryPausesHere(), RecoveryRequiresIntParameter(), ShutdownWalRcv(), StartupXLOG(), and WaitForWALToBecomeAvailable().
bool IsPromoteSignaled | ( | void | ) |
Definition at line 234 of file startup.c.
References promote_signaled.
Referenced by CheckForStandbyTrigger().
void PostRestoreCommand | ( | void | ) |
Definition at line 228 of file startup.c.
References in_restore_command.
Referenced by RestoreArchivedFile().
void PreRestoreCommand | ( | void | ) |
Definition at line 214 of file startup.c.
References in_restore_command, proc_exit(), and shutdown_requested.
Referenced by RestoreArchivedFile().
void ResetPromoteSignaled | ( | void | ) |
Definition at line 240 of file startup.c.
References promote_signaled.
Referenced by CheckForStandbyTrigger().
void StartupProcessMain | ( | void | ) |
Definition at line 170 of file startup.c.
References InitializeTimeouts(), PG_SETMASK, pqsignal(), proc_exit(), procsignal_sigusr1_handler(), RegisterTimeout(), SIG_DFL, SIG_IGN, SIGCHLD, SIGHUP, SIGPIPE, SIGUSR1, SIGUSR2, STANDBY_DEADLOCK_TIMEOUT, STANDBY_LOCK_TIMEOUT, STANDBY_TIMEOUT, StandbyDeadLockHandler(), StandbyLockTimeoutHandler(), StandbyTimeoutHandler(), StartupProcShutdownHandler(), StartupProcSigHupHandler(), StartupProcTriggerHandler(), StartupXLOG(), and UnBlockSig.
Referenced by AuxiliaryProcessMain().
|
static |
Definition at line 86 of file startup.c.
References in_restore_command, proc_exit(), shutdown_requested, and WakeupRecovery().
Referenced by StartupProcessMain().
|
static |
Definition at line 74 of file startup.c.
References got_SIGHUP, and WakeupRecovery().
Referenced by StartupProcessMain().
|
static |
Definition at line 62 of file startup.c.
References promote_signaled, and WakeupRecovery().
Referenced by StartupProcessMain().
|
static |
Definition at line 106 of file startup.c.
References pfree(), PGC_SIGHUP, PrimaryConnInfo, PrimarySlotName, ProcessConfigFile(), pstrdup(), StartupRequestWalReceiverRestart(), and wal_receiver_create_temp_slot.
Referenced by HandleStartupProcInterrupts().
|
static |
Definition at line 40 of file startup.c.
Referenced by HandleStartupProcInterrupts(), and StartupProcSigHupHandler().
|
static |
Definition at line 48 of file startup.c.
Referenced by PostRestoreCommand(), PreRestoreCommand(), and StartupProcShutdownHandler().
|
static |
Definition at line 42 of file startup.c.
Referenced by IsPromoteSignaled(), ResetPromoteSignaled(), and StartupProcTriggerHandler().
|
static |
Definition at line 41 of file startup.c.
Referenced by HandleStartupProcInterrupts(), PreRestoreCommand(), and StartupProcShutdownHandler().