PostgreSQL Source Code
git master
|
Go to the source code of this file.
Macros | |
#define | POSTMASTER_FD_WATCH |
#define | POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ |
#define | MAX_BACKENDS 0x3FFFF |
Functions | |
void | PostmasterMain (int argc, char *argv[]) pg_attribute_noreturn() |
void | ClosePostmasterPorts (bool am_syslogger) |
void | InitProcessGlobals (void) |
int | MaxLivePostmasterChildren (void) |
bool | PostmasterMarkPIDForWorkerNotify (int) |
#define MAX_BACKENDS 0x3FFFF |
Definition at line 78 of file postmaster.h.
#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ |
Definition at line 47 of file postmaster.h.
#define POSTMASTER_FD_WATCH |
Definition at line 46 of file postmaster.h.
void ClosePostmasterPorts | ( | bool | am_syslogger | ) |
Definition at line 2549 of file postmaster.c.
References close, ereport, errcode_for_file_access(), errmsg_internal(), FATAL, FreeWaitEventSetAfterFork(), i, ListenSocket, MAXLISTEN, PGINVALID_SOCKET, pm_wait_set, postmaster_alive_fds, POSTMASTER_FD_OWN, ReleaseExternalFD(), StreamClose(), and syslogPipe.
Referenced by BackendStartup(), do_start_bgworker(), StartAutoVacWorker(), StartChildProcess(), and SysLogger_Start().
void InitProcessGlobals | ( | void | ) |
Definition at line 2623 of file postmaster.c.
References GetCurrentTimestamp(), MyProcPid, MyStartTime, MyStartTimestamp, pg_global_prng_state, pg_prng_seed(), pg_prng_strong_seed, pg_prng_uint32(), timestamptz_to_time_t(), and unlikely.
Referenced by InitPostmasterChild(), InitStandaloneProcess(), and PostmasterMain().
int MaxLivePostmasterChildren | ( | void | ) |
Definition at line 5568 of file postmaster.c.
References autovacuum_max_workers, max_wal_senders, max_worker_processes, and MaxConnections.
Referenced by canAcceptConnections(), PMSignalShmemInit(), PMSignalShmemSize(), and processCancelRequest().
void PostmasterMain | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 585 of file postmaster.c.
References AddToDataDirLockFile(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ApplyLauncherRegister(), ARCHIVE_MODE_OFF, Assert(), autovac_init(), BgWriterPID, BlockSig, bonjour_name, ChangeToDataDir(), checkControlFile(), checkDataDir(), CheckDateTokenTables(), CheckpointerPID, CloseServerPorts(), CreateDataDirLockFile(), CreateOptsFile(), CreateSharedMemoryAndSemaphores(), DEBUG3, DestNone, dummy_handler(), enable_bonjour, EnableSSL, environ, ereport, err(), errcode(), errcode_for_file_access(), errhint(), errmsg(), errmsg_internal(), ERROR, ExitPostmaster(), external_pid_file, FATAL, fprintf, get_stats_option_name(), GetConfigOption(), GetConfigOptionFlags(), GetCurrentTimestamp(), getInstallationPaths(), getopt(), GUC_RUNTIME_COMPUTED, handle_pm_child_exit_signal(), handle_pm_pmsignal_signal(), handle_pm_reload_request_signal(), handle_pm_shutdown_request_signal(), HbaFileName, i, InitializeGUCOptions(), InitializeLatchSupport(), InitializeMaxBackends(), InitializeShmemGUCs(), InitializeWalConsistencyChecking(), InitPostmasterDeathWatchHandle(), InitProcessGlobals(), InitProcessLocalLatch(), IsBinaryUpgrade, IsPostmasterEnvironment, lfirst, list_free(), list_free_deep(), ListenAddresses, ListenSocket, load_hba(), load_ident(), LocalProcessControlFile(), LOCK_FILE_LINE_LISTEN_ADDR, LOCK_FILE_LINE_PM_STATUS, LOCK_FILE_LINE_SOCKET_DIR, LOG, Log_destination, LOG_DESTINATION_STDERR, Log_destination_string, LOG_METAINFO_DATAFILE, max_wal_senders, MaxConnections, MAXLISTEN, maybe_start_bgworkers(), MemoryContextSwitchTo(), my_exec_path, MyProcPid, name, NIL, on_proc_exit(), optarg, opterr, optind, ParseLongOption(), pfree(), pg_hton16, PG_MODE_MASK_OWNER, PG_TEMP_FILES_DIR, PGC_POSTMASTER, PGC_S_ARGV, PGC_S_OVERRIDE, PGC_SUSET, PGINVALID_SOCKET, PgStartTime, pgwin32_signal_initialize(), PM_STARTUP, PM_STATUS_STARTING, pmState, PostmasterContext, PostmasterPid, PostPortNumber, pqinitmask(), pqsignal(), process_shared_preload_libraries(), process_shmem_requests(), progname, pstrdup(), RemoveLogrotateSignalFiles(), RemovePgTempFiles(), RemovePgTempFilesInDir(), RemovePromoteSignalFiles(), ReservedConnections, S_IRGRP, S_IROTH, S_IRUSR, S_IWUSR, secure_initialize(), SelectConfigFiles(), ServerLoop(), set_debug_options(), set_max_safe_fds(), set_plan_disabling_options(), set_stack_base(), SetConfigOption(), SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SIGPIPE, SIGQUIT, SIGUSR1, SIGUSR2, SplitDirectoriesString(), SplitGUCList(), StartBackgroundWriter, StartCheckpointer, STARTUP_RUNNING, StartupDataBase, StartupPID, StartupStatus, STATUS_OK, StreamServerPort(), strerror, success, SuperuserReservedConnections, SysLogger_Start(), SysLoggerPID, TopMemoryContext, UnBlockSig, Unix_socket_directories, unlink_external_pid_file(), userDoption, value, wal_level, WAL_LEVEL_MINIMAL, WARNING, whereToSendOutput, write_stderr, and XLogArchiveMode.
Referenced by main().
bool PostmasterMarkPIDForWorkerNotify | ( | int | pid | ) |
Definition at line 5991 of file postmaster.c.
References BackendList, bkend::bgworker_notify, dlist_iter::cur, dlist_container, dlist_foreach, and bkend::pid.
Referenced by BackgroundWorkerStateChange().
|
extern |
Definition at line 236 of file postmaster.c.
Referenced by BackendInitialize(), and PerformAuthentication().
|
extern |
Definition at line 242 of file postmaster.c.
Referenced by PostmasterMain().
|
extern |
Definition at line 356 of file postmaster.c.
Referenced by BackendInitialize(), PerformAuthentication(), ProcessInterrupts(), quickdie(), should_output_to_client(), and StatementTimeoutHandler().
|
extern |
Definition at line 241 of file postmaster.c.
Referenced by PostmasterMain().
|
extern |
Definition at line 233 of file postmaster.c.
Referenced by parse_hba_line(), PostmasterMain(), and process_pm_reload_request().
|
extern |
Definition at line 205 of file postmaster.c.
Referenced by PostmasterMain().
|
extern |
Definition at line 239 of file postmaster.c.
Referenced by BackendInitialize(), ClientAuthentication(), PerformAuthentication(), and set_authn_id().
|
extern |
Definition at line 238 of file postmaster.c.
Referenced by BackendInitialize().
|
extern |
Definition at line 575 of file postmaster.c.
Referenced by AddWaitEventToSet(), ClosePostmasterPorts(), InitPostmasterChild(), InitPostmasterDeathWatchHandle(), and PostmasterIsAliveInternal().
|
extern |
Definition at line 199 of file postmaster.c.
Referenced by CreateLockFile(), and PostmasterMain().
|
extern |
Definition at line 235 of file postmaster.c.
Referenced by BackendInitialize().
|
extern |
Definition at line 45 of file main.c.
Referenced by _check_database_version(), BootstrapModeMain(), check_root(), checkControlFile(), cluster_all_databases(), cluster_one_database(), ConnectDatabase(), connectDatabase(), connectMaintenanceDatabase(), doConnect(), ensureCleanShutdown(), get_opts(), get_progname(), get_user_name_or_exit(), GetConnection(), getRestoreCommand(), help(), main(), ParallelSlotsSetup(), PostgresSingleUserMain(), PostmasterMain(), process_postgres_switches(), reindex_all_databases(), reindex_one_database(), SelectConfigFiles(), set_dump_section(), SetWALFileNameForCleanup(), sigTermHandler(), startup_hacks(), usage(), vacuum_all_databases(), and vacuum_one_database().
|
extern |
Definition at line 244 of file postmaster.c.
Referenced by PostmasterStateMachine().
|
extern |
Definition at line 226 of file postmaster.c.
Referenced by InitPostgres(), and PostmasterMain().
|
extern |
Definition at line 243 of file postmaster.c.
Referenced by PostmasterStateMachine().
|
extern |
Definition at line 245 of file postmaster.c.
Referenced by sigquit_child().
|
extern |
Definition at line 246 of file postmaster.c.
Referenced by ServerLoop().
|
extern |
Definition at line 225 of file postmaster.c.
Referenced by InitPostgres(), and PostmasterMain().
|
extern |
Definition at line 202 of file postmaster.c.
Referenced by PostmasterMain().
|
extern |
Definition at line 107 of file pqcomm.c.
Referenced by Setup_AF_UNIX().
|
extern |
Definition at line 106 of file pqcomm.c.
Referenced by Setup_AF_UNIX(), and show_unix_socket_permissions().