Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
postmaster.h82 linesDownload Raw Back to postmaster
1/*-------------------------------------------------------------------------2 *3 * postmaster.h4 *	  Exports from postmaster/postmaster.c.5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * src/include/postmaster/postmaster.h10 *11 *-------------------------------------------------------------------------12 */13#ifndef _POSTMASTER_H14#define _POSTMASTER_H15 16/* GUC options */17extern PGDLLIMPORT bool EnableSSL;18extern PGDLLIMPORT int SuperuserReservedConnections;19extern PGDLLIMPORT int ReservedConnections;20extern PGDLLIMPORT int PostPortNumber;21extern PGDLLIMPORT int Unix_socket_permissions;22extern PGDLLIMPORT char *Unix_socket_group;23extern PGDLLIMPORT char *Unix_socket_directories;24extern PGDLLIMPORT char *ListenAddresses;25extern PGDLLIMPORT bool ClientAuthInProgress;26extern PGDLLIMPORT int PreAuthDelay;27extern PGDLLIMPORT int AuthenticationTimeout;28extern PGDLLIMPORT bool Log_connections;29extern PGDLLIMPORT bool log_hostname;30extern PGDLLIMPORT bool enable_bonjour;31extern PGDLLIMPORT char *bonjour_name;32extern PGDLLIMPORT bool restart_after_crash;33extern PGDLLIMPORT bool remove_temp_files_after_crash;34extern PGDLLIMPORT bool send_abort_for_crash;35extern PGDLLIMPORT bool send_abort_for_kill;36 37#ifdef WIN3238extern PGDLLIMPORT HANDLE PostmasterHandle;39#else40extern PGDLLIMPORT int postmaster_alive_fds[2];41 42/*43 * Constants that represent which of postmaster_alive_fds is held by44 * postmaster, and which is used in children to check for postmaster death.45 */46#define POSTMASTER_FD_WATCH		0	/* used in children to check for47									 * postmaster death */48#define POSTMASTER_FD_OWN		1	/* kept open by postmaster only */49#endif50 51extern PGDLLIMPORT const char *progname;52 53extern void PostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();54extern void ClosePostmasterPorts(bool am_syslogger);55extern void InitProcessGlobals(void);56 57extern int	MaxLivePostmasterChildren(void);58 59extern bool PostmasterMarkPIDForWorkerNotify(int);60 61#ifdef EXEC_BACKEND62extern pid_t postmaster_forkexec(int argc, char *argv[]);63extern void SubPostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();64 65extern Size ShmemBackendArraySize(void);66extern void ShmemBackendArrayAllocation(void);67#endif68 69/*70 * Note: MAX_BACKENDS is limited to 2^18-1 because that's the width reserved71 * for buffer references in buf_internals.h.  This limitation could be lifted72 * by using a 64bit state; but it's unlikely to be worthwhile as 2^18-173 * backends exceed currently realistic configurations. Even if that limitation74 * were removed, we still could not a) exceed 2^23-1 because inval.c stores75 * the backend ID as a 3-byte signed integer, b) INT_MAX/4 because some places76 * compute 4*MaxBackends without any overflow check.  This is rechecked in the77 * relevant GUC check hooks and in RegisterBackgroundWorker().78 */79#define MAX_BACKENDS	0x3FFFF80 81#endif							/* _POSTMASTER_H */82 
codekingpro/portable-devtools · Team Ai