gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.6KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * postmaster.h
  4. * Exports from postmaster/postmaster.c.
  5. *
  6. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  7. * Portions Copyright (c) 1994, Regents of the University of California
  8. *
  9. * src/include/postmaster/postmaster.h
  10. *
  11. *-------------------------------------------------------------------------
  12. */
  13. #ifndef _POSTMASTER_H
  14. #define _POSTMASTER_H
  15. /* GUC options */
  16. extern bool EnableSSL;
  17. extern int ReservedBackends;
  18. extern PGDLLIMPORT int PostPortNumber;
  19. extern int Unix_socket_permissions;
  20. extern char *Unix_socket_group;
  21. extern char *Unix_socket_directories;
  22. extern char *ListenAddresses;
  23. extern bool ClientAuthInProgress;
  24. extern int PreAuthDelay;
  25. extern int AuthenticationTimeout;
  26. extern bool Log_connections;
  27. extern bool log_hostname;
  28. extern bool enable_bonjour;
  29. extern char *bonjour_name;
  30. extern bool restart_after_crash;
  31. #ifdef WIN32
  32. extern HANDLE PostmasterHandle;
  33. #else
  34. extern int postmaster_alive_fds[2];
  35. /*
  36. * Constants that represent which of postmaster_alive_fds is held by
  37. * postmaster, and which is used in children to check for postmaster death.
  38. */
  39. #define POSTMASTER_FD_WATCH 0 /* used in children to check for
  40. * postmaster death */
  41. #define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */
  42. #endif
  43. extern PGDLLIMPORT const char *progname;
  44. extern void PostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();
  45. extern void ClosePostmasterPorts(bool am_syslogger);
  46. extern void InitProcessGlobals(void);
  47. extern int MaxLivePostmasterChildren(void);
  48. extern int GetNumShmemAttachedBgworkers(void);
  49. extern bool PostmasterMarkPIDForWorkerNotify(int);
  50. #ifdef EXEC_BACKEND
  51. extern pid_t postmaster_forkexec(int argc, char *argv[]);
  52. extern void SubPostmasterMain(int argc, char *argv[]) pg_attribute_noreturn();
  53. extern Size ShmemBackendArraySize(void);
  54. extern void ShmemBackendArrayAllocation(void);
  55. #endif
  56. /*
  57. * Note: MAX_BACKENDS is limited to 2^18-1 because that's the width reserved
  58. * for buffer references in buf_internals.h. This limitation could be lifted
  59. * by using a 64bit state; but it's unlikely to be worthwhile as 2^18-1
  60. * backends exceed currently realistic configurations. Even if that limitation
  61. * were removed, we still could not a) exceed 2^23-1 because inval.c stores
  62. * the backend ID as a 3-byte signed integer, b) INT_MAX/4 because some places
  63. * compute 4*MaxBackends without any overflow check. This is rechecked in the
  64. * relevant GUC check hooks and in RegisterBackgroundWorker().
  65. */
  66. #define MAX_BACKENDS 0x3FFFF
  67. #endif /* _POSTMASTER_H */
上海开阖软件有限公司 沪ICP备12045867号-1