PostgreSQL Source Code  git master
postmaster.h File Reference
This graph shows which files directly or indirectly include this file:

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)
 
int MaxLivePostmasterChildren (void)
 
int GetNumShmemAttachedBgworkers (void)
 
bool PostmasterMarkPIDForWorkerNotify (int)
 

Variables

bool EnableSSL
 
int ReservedBackends
 
PGDLLIMPORT int PostPortNumber
 
int Unix_socket_permissions
 
char * Unix_socket_group
 
char * Unix_socket_directories
 
char * ListenAddresses
 
bool ClientAuthInProgress
 
int PreAuthDelay
 
int AuthenticationTimeout
 
bool Log_connections
 
bool log_hostname
 
bool enable_bonjour
 
char * bonjour_name
 
bool restart_after_crash
 
int postmaster_alive_fds [2]
 
PGDLLIMPORT const char * progname
 

Macro Definition Documentation

◆ MAX_BACKENDS

◆ POSTMASTER_FD_OWN

#define POSTMASTER_FD_OWN   1 /* kept open by postmaster only */

Definition at line 44 of file postmaster.h.

Referenced by ClosePostmasterPorts().

◆ POSTMASTER_FD_WATCH

#define POSTMASTER_FD_WATCH
Value:
0 /* used in children to check for
* postmaster death */

Definition at line 42 of file postmaster.h.

Referenced by AddWaitEventToSet(), InitPostmasterDeathWatchHandle(), and PostmasterIsAlive().

Function Documentation

◆ ClosePostmasterPorts()

void ClosePostmasterPorts ( bool  am_syslogger)

Definition at line 2499 of file postmaster.c.

References close, ereport, errcode_for_file_access(), errmsg_internal(), FATAL, i, ListenSocket, MAXLISTEN, PGINVALID_SOCKET, postmaster_alive_fds, POSTMASTER_FD_OWN, StreamClose(), and syslogPipe.

Referenced by BackendRun(), BackendStartup(), do_start_bgworker(), pgarch_start(), pgstat_start(), StartAutoVacLauncher(), StartAutoVacWorker(), StartChildProcess(), and SysLogger_Start().

2500 {
2501  int i;
2502 
2503 #ifndef WIN32
2504 
2505  /*
2506  * Close the write end of postmaster death watch pipe. It's important to
2507  * do this as early as possible, so that if postmaster dies, others won't
2508  * think that it's still running because we're holding the pipe open.
2509  */
2511  ereport(FATAL,
2513  errmsg_internal("could not close postmaster death monitoring pipe in child process: %m")));
2515 #endif
2516 
2517  /* Close the listen sockets */
2518  for (i = 0; i < MAXLISTEN; i++)
2519  {
2520  if (ListenSocket[i] != PGINVALID_SOCKET)
2521  {
2524  }
2525  }
2526 
2527  /* If using syslogger, close the read side of the pipe */
2528  if (!am_syslogger)
2529  {
2530 #ifndef WIN32
2531  if (syslogPipe[0] >= 0)
2532  close(syslogPipe[0]);
2533  syslogPipe[0] = -1;
2534 #else
2535  if (syslogPipe[0])
2536  CloseHandle(syslogPipe[0]);
2537  syslogPipe[0] = 0;
2538 #endif
2539  }
2540 
2541 #ifdef USE_BONJOUR
2542  /* If using Bonjour, close the connection to the mDNS daemon */
2543  if (bonjour_sdref)
2544  close(DNSServiceRefSockFD(bonjour_sdref));
2545 #endif
2546 }
void StreamClose(pgsocket sock)
Definition: pqcomm.c:844
#define FATAL
Definition: elog.h:52
bool am_syslogger
Definition: syslogger.c:74
#define POSTMASTER_FD_OWN
Definition: postmaster.h:44
int errcode_for_file_access(void)
Definition: elog.c:598
#define ereport(elevel, rest)
Definition: elog.h:122
int postmaster_alive_fds[2]
Definition: postmaster.c:564
static pgsocket ListenSocket[MAXLISTEN]
Definition: postmaster.c:216
#define PGINVALID_SOCKET
Definition: port.h:33
int errmsg_internal(const char *fmt,...)
Definition: elog.c:827
int i
#define close(a)
Definition: win32.h:12
#define MAXLISTEN
Definition: postmaster.c:215
int syslogPipe[2]
Definition: syslogger.c:112

◆ GetNumShmemAttachedBgworkers()

int GetNumShmemAttachedBgworkers ( void  )

◆ MaxLivePostmasterChildren()

int MaxLivePostmasterChildren ( void  )

Definition at line 5578 of file postmaster.c.

References autovacuum_max_workers, max_worker_processes, and MaxConnections.

Referenced by canAcceptConnections(), PMSignalShmemInit(), PMSignalShmemSize(), PostmasterMarkPIDForWorkerNotify(), and processCancelRequest().

5579 {
5580  return 2 * (MaxConnections + autovacuum_max_workers + 1 +
5582 }
int MaxConnections
Definition: globals.c:123
int autovacuum_max_workers
Definition: autovacuum.c:115
int max_worker_processes
Definition: globals.c:124

◆ PostmasterMain()

void PostmasterMain ( int  argc,
char *  argv[] 
)

Definition at line 574 of file postmaster.c.

References AddToDataDirLockFile(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate(), ApplyLauncherRegister(), ARCHIVE_MODE_OFF, Assert, autovac_init(), BlockSig, bonjour_name, ChangeToDataDir(), checkDataDir(), CheckDateTokenTables(), CloseServerPorts(), CreateDataDirLockFile(), CreateOptsFile(), DEBUG3, DestNone, dummy_handler(), elog, enable_bonjour, EnableSSL, environ, ereport, errcode(), errcode_for_file_access(), errhint(), errmsg(), errmsg_internal(), ERROR, ExitPostmaster(), external_pid_file, ExtraOptions, FATAL, free, get_stats_option_name(), GetConfigOption(), GetCurrentTimestamp(), getInstallationPaths(), getopt(), gettimeofday(), i, InitializeGUCOptions(), InitializeMaxBackends(), InitPostmasterDeathWatchHandle(), 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, MyStartTime, name, NIL, on_proc_exit(), optarg, opterr, optind, ParseLongOption(), pfree(), pg_hton16, PG_SETMASK, PGC_POSTMASTER, PGC_S_ARGV, PGINVALID_SOCKET, PgStartTime, pgstat_init(), PM_STARTUP, PM_STATUS_STARTING, pmdie(), pmState, PostmasterContext, PostmasterPid, PostPortNumber, pqinitmask(), pqsignal(), pqsignal_no_restart(), process_shared_preload_libraries(), progname, pstrdup(), random_start_time, reaper(), Reinit, RemovePgTempFiles(), RemovePromoteSignalFiles(), ReservedBackends, reset_shared(), S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IWUSR, secure_initialize(), SelectConfigFiles(), SendStop, ServerLoop(), set_debug_options(), set_max_safe_fds(), set_plan_disabling_options(), set_stack_base(), SetConfigOption(), SIG_IGN, SIGALRM, SIGCHLD, SIGHUP, SIGHUP_handler(), SIGPIPE, SIGQUIT, SIGTTIN, SIGTTOU, SIGUSR1, sigusr1_handler(), SIGUSR2, snprintf(), SplitDirectoriesString(), SplitIdentifierString(), srandom(), STARTUP_RUNNING, StartupDataBase, StartupPID, StartupStatus, status(), STATUS_OK, StreamServerPort(), strerror(), success, SysLogger_Start(), SysLoggerPID, TopMemoryContext, Unix_socket_directories, unlink_external_pid_file(), userDoption, value, wal_level, WAL_LEVEL_MINIMAL, WARNING, whereToSendOutput, write_stderr, and XLogArchiveMode.

Referenced by main().

575 {
576  int opt;
577  int status;
578  char *userDoption = NULL;
579  bool listen_addr_saved = false;
580  int i;
581  char *output_config_variable = NULL;
582 
583  MyProcPid = PostmasterPid = getpid();
584 
585  MyStartTime = time(NULL);
586 
588 
589  /*
590  * for security, no dir or file created can be group or other accessible
591  */
592  umask(S_IRWXG | S_IRWXO);
593 
594  /*
595  * Initialize random(3) so we don't get the same values in every run.
596  *
597  * Note: the seed is pretty predictable from externally-visible facts such
598  * as postmaster start time, so avoid using random() for security-critical
599  * random values during postmaster startup. At the time of first
600  * connection, PostmasterRandom will select a hopefully-more-random seed.
601  */
602  srandom((unsigned int) (MyProcPid ^ MyStartTime));
603 
604  /*
605  * By default, palloc() requests in the postmaster will be allocated in
606  * the PostmasterContext, which is space that can be recycled by backends.
607  * Allocated data that needs to be available to backends should be
608  * allocated in TopMemoryContext.
609  */
611  "Postmaster",
614 
615  /* Initialize paths to installation files */
616  getInstallationPaths(argv[0]);
617 
618  /*
619  * Set up signal handlers for the postmaster process.
620  *
621  * In the postmaster, we want to install non-ignored handlers *without*
622  * SA_RESTART. This is because they'll be blocked at all times except
623  * when ServerLoop is waiting for something to happen, and during that
624  * window, we want signals to exit the select(2) wait so that ServerLoop
625  * can respond if anything interesting happened. On some platforms,
626  * signals marked SA_RESTART would not cause the select() wait to end.
627  * Child processes will generally want SA_RESTART, but we expect them to
628  * set up their own handlers before unblocking signals.
629  *
630  * CAUTION: when changing this list, check for side-effects on the signal
631  * handling setup of child processes. See tcop/postgres.c,
632  * bootstrap/bootstrap.c, postmaster/bgwriter.c, postmaster/walwriter.c,
633  * postmaster/autovacuum.c, postmaster/pgarch.c, postmaster/pgstat.c,
634  * postmaster/syslogger.c, postmaster/bgworker.c and
635  * postmaster/checkpointer.c.
636  */
637  pqinitmask();
639 
640  pqsignal_no_restart(SIGHUP, SIGHUP_handler); /* reread config file and
641  * have children do same */
642  pqsignal_no_restart(SIGINT, pmdie); /* send SIGTERM and shut down */
643  pqsignal_no_restart(SIGQUIT, pmdie); /* send SIGQUIT and die */
644  pqsignal_no_restart(SIGTERM, pmdie); /* wait for children and shut down */
645  pqsignal(SIGALRM, SIG_IGN); /* ignored */
646  pqsignal(SIGPIPE, SIG_IGN); /* ignored */
647  pqsignal_no_restart(SIGUSR1, sigusr1_handler); /* message from child
648  * process */
649  pqsignal_no_restart(SIGUSR2, dummy_handler); /* unused, reserve for
650  * children */
651  pqsignal_no_restart(SIGCHLD, reaper); /* handle child termination */
652  pqsignal(SIGTTIN, SIG_IGN); /* ignored */
653  pqsignal(SIGTTOU, SIG_IGN); /* ignored */
654  /* ignore SIGXFSZ, so that ulimit violations work like disk full */
655 #ifdef SIGXFSZ
656  pqsignal(SIGXFSZ, SIG_IGN); /* ignored */
657 #endif
658 
659  /*
660  * Options setup
661  */
663 
664  opterr = 1;
665 
666  /*
667  * Parse command-line options. CAUTION: keep this in sync with
668  * tcop/postgres.c (the option sets should not conflict) and with the
669  * common help() function in main/main.c.
670  */
671  while ((opt = getopt(argc, argv, "B:bc:C:D:d:EeFf:h:ijk:lN:nOo:Pp:r:S:sTt:W:-:")) != -1)
672  {
673  switch (opt)
674  {
675  case 'B':
676  SetConfigOption("shared_buffers", optarg, PGC_POSTMASTER, PGC_S_ARGV);
677  break;
678 
679  case 'b':
680  /* Undocumented flag used for binary upgrades */
681  IsBinaryUpgrade = true;
682  break;
683 
684  case 'C':
685  output_config_variable = strdup(optarg);
686  break;
687 
688  case 'D':
689  userDoption = strdup(optarg);
690  break;
691 
692  case 'd':
694  break;
695 
696  case 'E':
697  SetConfigOption("log_statement", "all", PGC_POSTMASTER, PGC_S_ARGV);
698  break;
699 
700  case 'e':
701  SetConfigOption("datestyle", "euro", PGC_POSTMASTER, PGC_S_ARGV);
702  break;
703 
704  case 'F':
705  SetConfigOption("fsync", "false", PGC_POSTMASTER, PGC_S_ARGV);
706  break;
707 
708  case 'f':
710  {
711  write_stderr("%s: invalid argument for option -f: \"%s\"\n",
712  progname, optarg);
713  ExitPostmaster(1);
714  }
715  break;
716 
717  case 'h':
718  SetConfigOption("listen_addresses", optarg, PGC_POSTMASTER, PGC_S_ARGV);
719  break;
720 
721  case 'i':
722  SetConfigOption("listen_addresses", "*", PGC_POSTMASTER, PGC_S_ARGV);
723  break;
724 
725  case 'j':
726  /* only used by interactive backend */
727  break;
728 
729  case 'k':
730  SetConfigOption("unix_socket_directories", optarg, PGC_POSTMASTER, PGC_S_ARGV);
731  break;
732 
733  case 'l':
734  SetConfigOption("ssl", "true", PGC_POSTMASTER, PGC_S_ARGV);
735  break;
736 
737  case 'N':
738  SetConfigOption("max_connections", optarg, PGC_POSTMASTER, PGC_S_ARGV);
739  break;
740 
741  case 'n':
742  /* Don't reinit shared mem after abnormal exit */
743  Reinit = false;
744  break;
745 
746  case 'O':
747  SetConfigOption("allow_system_table_mods", "true", PGC_POSTMASTER, PGC_S_ARGV);
748  break;
749 
750  case 'o':
751  /* Other options to pass to the backend on the command line */
753  sizeof(ExtraOptions) - strlen(ExtraOptions),
754  " %s", optarg);
755  break;
756 
757  case 'P':
758  SetConfigOption("ignore_system_indexes", "true", PGC_POSTMASTER, PGC_S_ARGV);
759  break;
760 
761  case 'p':
763  break;
764 
765  case 'r':
766  /* only used by single-user backend */
767  break;
768 
769  case 'S':
771  break;
772 
773  case 's':
774  SetConfigOption("log_statement_stats", "true", PGC_POSTMASTER, PGC_S_ARGV);
775  break;
776 
777  case 'T':
778 
779  /*
780  * In the event that some backend dumps core, send SIGSTOP,
781  * rather than SIGQUIT, to all its peers. This lets the wily
782  * post_hacker collect core dumps from everyone.
783  */
784  SendStop = true;
785  break;
786 
787  case 't':
788  {
789  const char *tmp = get_stats_option_name(optarg);
790 
791  if (tmp)
792  {
794  }
795  else
796  {
797  write_stderr("%s: invalid argument for option -t: \"%s\"\n",
798  progname, optarg);
799  ExitPostmaster(1);
800  }
801  break;
802  }
803 
804  case 'W':
805  SetConfigOption("post_auth_delay", optarg, PGC_POSTMASTER, PGC_S_ARGV);
806  break;
807 
808  case 'c':
809  case '-':
810  {
811  char *name,
812  *value;
813 
814  ParseLongOption(optarg, &name, &value);
815  if (!value)
816  {
817  if (opt == '-')
818  ereport(ERROR,
819  (errcode(ERRCODE_SYNTAX_ERROR),
820  errmsg("--%s requires a value",
821  optarg)));
822  else
823  ereport(ERROR,
824  (errcode(ERRCODE_SYNTAX_ERROR),
825  errmsg("-c %s requires a value",
826  optarg)));
827  }
828 
830  free(name);
831  if (value)
832  free(value);
833  break;
834  }
835 
836  default:
837  write_stderr("Try \"%s --help\" for more information.\n",
838  progname);
839  ExitPostmaster(1);
840  }
841  }
842 
843  /*
844  * Postmaster accepts no non-option switch arguments.
845  */
846  if (optind < argc)
847  {
848  write_stderr("%s: invalid argument: \"%s\"\n",
849  progname, argv[optind]);
850  write_stderr("Try \"%s --help\" for more information.\n",
851  progname);
852  ExitPostmaster(1);
853  }
854 
855  /*
856  * Locate the proper configuration files and data directory, and read
857  * postgresql.conf for the first time.
858  */
859  if (!SelectConfigFiles(userDoption, progname))
860  ExitPostmaster(2);
861 
862  if (output_config_variable != NULL)
863  {
864  /*
865  * "-C guc" was specified, so print GUC's value and exit. No extra
866  * permission check is needed because the user is reading inside the
867  * data dir.
868  */
869  const char *config_val = GetConfigOption(output_config_variable,
870  false, false);
871 
872  puts(config_val ? config_val : "");
873  ExitPostmaster(0);
874  }
875 
876  /* Verify that DataDir looks reasonable */
877  checkDataDir();
878 
879  /* And switch working directory into it */
880  ChangeToDataDir();
881 
882  /*
883  * Check for invalid combinations of GUC settings.
884  */
886  {
887  write_stderr("%s: superuser_reserved_connections must be less than max_connections\n", progname);
888  ExitPostmaster(1);
889  }
891  {
892  write_stderr("%s: max_wal_senders must be less than max_connections\n", progname);
893  ExitPostmaster(1);
894  }
896  ereport(ERROR,
897  (errmsg("WAL archival cannot be enabled when wal_level is \"minimal\"")));
899  ereport(ERROR,
900  (errmsg("WAL streaming (max_wal_senders > 0) requires wal_level \"replica\" or \"logical\"")));
901 
902  /*
903  * Other one-time internal sanity checks can go here, if they are fast.
904  * (Put any slow processing further down, after postmaster.pid creation.)
905  */
906  if (!CheckDateTokenTables())
907  {
908  write_stderr("%s: invalid datetoken tables, please fix\n", progname);
909  ExitPostmaster(1);
910  }
911 
912  /*
913  * Now that we are done processing the postmaster arguments, reset
914  * getopt(3) library so that it will work correctly in subprocesses.
915  */
916  optind = 1;
917 #ifdef HAVE_INT_OPTRESET
918  optreset = 1; /* some systems need this too */
919 #endif
920 
921  /* For debugging: display postmaster environment */
922  {
923  extern char **environ;
924  char **p;
925 
926  ereport(DEBUG3,
927  (errmsg_internal("%s: PostmasterMain: initial environment dump:",
928  progname)));
929  ereport(DEBUG3,
930  (errmsg_internal("-----------------------------------------")));
931  for (p = environ; *p; ++p)
932  ereport(DEBUG3,
933  (errmsg_internal("\t%s", *p)));
934  ereport(DEBUG3,
935  (errmsg_internal("-----------------------------------------")));
936  }
937 
938  /*
939  * Create lockfile for data directory.
940  *
941  * We want to do this before we try to grab the input sockets, because the
942  * data directory interlock is more reliable than the socket-file
943  * interlock (thanks to whoever decided to put socket files in /tmp :-().
944  * For the same reason, it's best to grab the TCP socket(s) before the
945  * Unix socket(s).
946  *
947  * Also note that this internally sets up the on_proc_exit function that
948  * is responsible for removing both data directory and socket lockfiles;
949  * so it must happen before opening sockets so that at exit, the socket
950  * lockfiles go away after CloseServerPorts runs.
951  */
952  CreateDataDirLockFile(true);
953 
954  /* read control file (error checking and contains config) */
956 
957  /*
958  * Initialize SSL library, if specified.
959  */
960 #ifdef USE_SSL
961  if (EnableSSL)
962  {
963  (void) secure_initialize(true);
964  LoadedSSL = true;
965  }
966 #endif
967 
968  /*
969  * Register the apply launcher. Since it registers a background worker,
970  * it needs to be called before InitializeMaxBackends(), and it's probably
971  * a good idea to call it before any modules had chance to take the
972  * background worker slots.
973  */
975 
976  /*
977  * process any libraries that should be preloaded at postmaster start
978  */
980 
981  /*
982  * Now that loadable modules have had their chance to register background
983  * workers, calculate MaxBackends.
984  */
986 
987  /*
988  * Establish input sockets.
989  *
990  * First, mark them all closed, and set up an on_proc_exit function that's
991  * charged with closing the sockets again at postmaster shutdown.
992  */
993  for (i = 0; i < MAXLISTEN; i++)
995 
997 
998  if (ListenAddresses)
999  {
1000  char *rawstring;
1001  List *elemlist;
1002  ListCell *l;
1003  int success = 0;
1004 
1005  /* Need a modifiable copy of ListenAddresses */
1006  rawstring = pstrdup(ListenAddresses);
1007 
1008  /* Parse string into list of hostnames */
1009  if (!SplitIdentifierString(rawstring, ',', &elemlist))
1010  {
1011  /* syntax error in list */
1012  ereport(FATAL,
1013  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1014  errmsg("invalid list syntax in parameter \"%s\"",
1015  "listen_addresses")));
1016  }
1017 
1018  foreach(l, elemlist)
1019  {
1020  char *curhost = (char *) lfirst(l);
1021 
1022  if (strcmp(curhost, "*") == 0)
1023  status = StreamServerPort(AF_UNSPEC, NULL,
1024  (unsigned short) PostPortNumber,
1025  NULL,
1027  else
1028  status = StreamServerPort(AF_UNSPEC, curhost,
1029  (unsigned short) PostPortNumber,
1030  NULL,
1031  ListenSocket, MAXLISTEN);
1032 
1033  if (status == STATUS_OK)
1034  {
1035  success++;
1036  /* record the first successful host addr in lockfile */
1037  if (!listen_addr_saved)
1038  {
1040  listen_addr_saved = true;
1041  }
1042  }
1043  else
1044  ereport(WARNING,
1045  (errmsg("could not create listen socket for \"%s\"",
1046  curhost)));
1047  }
1048 
1049  if (!success && elemlist != NIL)
1050  ereport(FATAL,
1051  (errmsg("could not create any TCP/IP sockets")));
1052 
1053  list_free(elemlist);
1054  pfree(rawstring);
1055  }
1056 
1057 #ifdef USE_BONJOUR
1058  /* Register for Bonjour only if we opened TCP socket(s) */
1059  if (enable_bonjour && ListenSocket[0] != PGINVALID_SOCKET)
1060  {
1061  DNSServiceErrorType err;
1062 
1063  /*
1064  * We pass 0 for interface_index, which will result in registering on
1065  * all "applicable" interfaces. It's not entirely clear from the
1066  * DNS-SD docs whether this would be appropriate if we have bound to
1067  * just a subset of the available network interfaces.
1068  */
1069  err = DNSServiceRegister(&bonjour_sdref,
1070  0,
1071  0,
1072  bonjour_name,
1073  "_postgresql._tcp.",
1074  NULL,
1075  NULL,
1077  0,
1078  NULL,
1079  NULL,
1080  NULL);
1081  if (err != kDNSServiceErr_NoError)
1082  elog(LOG, "DNSServiceRegister() failed: error code %ld",
1083  (long) err);
1084 
1085  /*
1086  * We don't bother to read the mDNS daemon's reply, and we expect that
1087  * it will automatically terminate our registration when the socket is
1088  * closed at postmaster termination. So there's nothing more to be
1089  * done here. However, the bonjour_sdref is kept around so that
1090  * forked children can close their copies of the socket.
1091  */
1092  }
1093 #endif
1094 
1095 #ifdef HAVE_UNIX_SOCKETS
1097  {
1098  char *rawstring;
1099  List *elemlist;
1100  ListCell *l;
1101  int success = 0;
1102 
1103  /* Need a modifiable copy of Unix_socket_directories */
1104  rawstring = pstrdup(Unix_socket_directories);
1105 
1106  /* Parse string into list of directories */
1107  if (!SplitDirectoriesString(rawstring, ',', &elemlist))
1108  {
1109  /* syntax error in list */
1110  ereport(FATAL,
1111  (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1112  errmsg("invalid list syntax in parameter \"%s\"",
1113  "unix_socket_directories")));
1114  }
1115 
1116  foreach(l, elemlist)
1117  {
1118  char *socketdir = (char *) lfirst(l);
1119 
1120  status = StreamServerPort(AF_UNIX, NULL,
1121  (unsigned short) PostPortNumber,
1122  socketdir,
1123  ListenSocket, MAXLISTEN);
1124 
1125  if (status == STATUS_OK)
1126  {
1127  success++;
1128  /* record the first successful Unix socket in lockfile */
1129  if (success == 1)
1131  }
1132  else
1133  ereport(WARNING,
1134  (errmsg("could not create Unix-domain socket in directory \"%s\"",
1135  socketdir)));
1136  }
1137 
1138  if (!success && elemlist != NIL)
1139  ereport(FATAL,
1140  (errmsg("could not create any Unix-domain sockets")));
1141 
1142  list_free_deep(elemlist);
1143  pfree(rawstring);
1144  }
1145 #endif
1146 
1147  /*
1148  * check that we have some socket to listen on
1149  */
1150  if (ListenSocket[0] == PGINVALID_SOCKET)
1151  ereport(FATAL,
1152  (errmsg("no socket created for listening")));
1153 
1154  /*
1155  * If no valid TCP ports, write an empty line for listen address,
1156  * indicating the Unix socket must be used. Note that this line is not
1157  * added to the lock file until there is a socket backing it.
1158  */
1159  if (!listen_addr_saved)
1161 
1162  /*
1163  * Set up shared memory and semaphores.
1164  */
1166 
1167  /*
1168  * Estimate number of openable files. This must happen after setting up
1169  * semaphores, because on some platforms semaphores count as open files.
1170  */
1171  set_max_safe_fds();
1172 
1173  /*
1174  * Set reference point for stack-depth checking.
1175  */
1176  set_stack_base();
1177 
1178  /*
1179  * Initialize pipe (or process handle on Windows) that allows children to
1180  * wake up from sleep on postmaster death.
1181  */
1183 
1184 #ifdef WIN32
1185 
1186  /*
1187  * Initialize I/O completion port used to deliver list of dead children.
1188  */
1189  win32ChildQueue = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1);
1190  if (win32ChildQueue == NULL)
1191  ereport(FATAL,
1192  (errmsg("could not create I/O completion port for child queue")));
1193 #endif
1194 
1195  /*
1196  * Record postmaster options. We delay this till now to avoid recording
1197  * bogus options (eg, NBuffers too high for available memory).
1198  */
1199  if (!CreateOptsFile(argc, argv, my_exec_path))
1200  ExitPostmaster(1);
1201 
1202 #ifdef EXEC_BACKEND
1203  /* Write out nondefault GUC settings for child processes to use */
1204  write_nondefault_variables(PGC_POSTMASTER);
1205 #endif
1206 
1207  /*
1208  * Write the external PID file if requested
1209  */
1210  if (external_pid_file)
1211  {
1212  FILE *fpidfile = fopen(external_pid_file, "w");
1213 
1214  if (fpidfile)
1215  {
1216  fprintf(fpidfile, "%d\n", MyProcPid);
1217  fclose(fpidfile);
1218 
1219  /* Make PID file world readable */
1220  if (chmod(external_pid_file, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) != 0)
1221  write_stderr("%s: could not change permissions of external PID file \"%s\": %s\n",
1223  }
1224  else
1225  write_stderr("%s: could not write external PID file \"%s\": %s\n",
1227 
1229  }
1230 
1231  /*
1232  * Remove old temporary files. At this point there can be no other
1233  * Postgres processes running in this directory, so this should be safe.
1234  */
1236 
1237  /*
1238  * Forcibly remove the files signaling a standby promotion request.
1239  * Otherwise, the existence of those files triggers a promotion too early,
1240  * whether a user wants that or not.
1241  *
1242  * This removal of files is usually unnecessary because they can exist
1243  * only during a few moments during a standby promotion. However there is
1244  * a race condition: if pg_ctl promote is executed and creates the files
1245  * during a promotion, the files can stay around even after the server is
1246  * brought up to new master. Then, if new standby starts by using the
1247  * backup taken from that master, the files can exist at the server
1248  * startup and should be removed in order to avoid an unexpected
1249  * promotion.
1250  *
1251  * Note that promotion signal files need to be removed before the startup
1252  * process is invoked. Because, after that, they can be used by
1253  * postmaster's SIGUSR1 signal handler.
1254  */
1256 
1257  /* Remove any outdated file holding the current log filenames. */
1258  if (unlink(LOG_METAINFO_DATAFILE) < 0 && errno != ENOENT)
1259  ereport(LOG,
1261  errmsg("could not remove file \"%s\": %m",
1263 
1264  /*
1265  * If enabled, start up syslogger collection subprocess
1266  */
1268 
1269  /*
1270  * Reset whereToSendOutput from DestDebug (its starting state) to
1271  * DestNone. This stops ereport from sending log messages to stderr unless
1272  * Log_destination permits. We don't do this until the postmaster is
1273  * fully launched, since startup failures may as well be reported to
1274  * stderr.
1275  *
1276  * If we are in fact disabling logging to stderr, first emit a log message
1277  * saying so, to provide a breadcrumb trail for users who may not remember
1278  * that their logging is configured to go somewhere else.
1279  */
1281  ereport(LOG,
1282  (errmsg("ending log output to stderr"),
1283  errhint("Future log output will go to log destination \"%s\".",
1285 
1287 
1288  /*
1289  * Initialize stats collection subsystem (this does NOT start the
1290  * collector process!)
1291  */
1292  pgstat_init();
1293 
1294  /*
1295  * Initialize the autovacuum subsystem (again, no process start yet)
1296  */
1297  autovac_init();
1298 
1299  /*
1300  * Load configuration files for client authentication.
1301  */
1302  if (!load_hba())
1303  {
1304  /*
1305  * It makes no sense to continue if we fail to load the HBA file,
1306  * since there is no way to connect to the database in this case.
1307  */
1308  ereport(FATAL,
1309  (errmsg("could not load pg_hba.conf")));
1310  }
1311  if (!load_ident())
1312  {
1313  /*
1314  * We can start up without the IDENT file, although it means that you
1315  * cannot log in using any of the authentication methods that need a
1316  * user name mapping. load_ident() already logged the details of error
1317  * to the log.
1318  */
1319  }
1320 
1321 #ifdef HAVE_PTHREAD_IS_THREADED_NP
1322 
1323  /*
1324  * On macOS, libintl replaces setlocale() with a version that calls
1325  * CFLocaleCopyCurrent() when its second argument is "" and every relevant
1326  * environment variable is unset or empty. CFLocaleCopyCurrent() makes
1327  * the process multithreaded. The postmaster calls sigprocmask() and
1328  * calls fork() without an immediate exec(), both of which have undefined
1329  * behavior in a multithreaded program. A multithreaded postmaster is the
1330  * normal case on Windows, which offers neither fork() nor sigprocmask().
1331  */
1332  if (pthread_is_threaded_np() != 0)
1333  ereport(FATAL,
1334  (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1335  errmsg("postmaster became multithreaded during startup"),
1336  errhint("Set the LC_ALL environment variable to a valid locale.")));
1337 #endif
1338 
1339  /*
1340  * Remember postmaster startup time
1341  */
1343 #ifndef HAVE_STRONG_RANDOM
1344  /* RandomCancelKey wants its own copy */
1346 #endif
1347 
1348  /*
1349  * Report postmaster status in the postmaster.pid file, to allow pg_ctl to
1350  * see what's happening.
1351  */
1353 
1354  /*
1355  * We're ready to rock and roll...
1356  */
1358  Assert(StartupPID != 0);
1360  pmState = PM_STARTUP;
1361 
1362  /* Some workers may be scheduled to start now */
1364 
1365  status = ServerLoop();
1366 
1367  /*
1368  * ServerLoop probably shouldn't ever return, but if it does, close down.
1369  */
1370  ExitPostmaster(status != STATUS_OK);
1371 
1372  abort(); /* not reached */
1373 }
pg_stack_base_t set_stack_base(void)
Definition: postgres.c:3097
const char * GetConfigOption(const char *name, bool missing_ok, bool restrict_superuser)
Definition: guc.c:6724
int secure_initialize(bool isServerStart)
Definition: be-secure.c:74
#define NIL
Definition: pg_list.h:69
bool IsPostmasterEnvironment
Definition: globals.c:100
bool EnableSSL
Definition: postmaster.c:234
#define SIGQUIT
Definition: win32_port.h:164
static StartupStatusEnum StartupStatus
Definition: postmaster.c:267
int gettimeofday(struct timeval *tp, struct timezone *tzp)
Definition: gettimeofday.c:105
#define S_IRGRP
Definition: win32_port.h:283
static void unlink_external_pid_file(int status, Datum arg)
Definition: postmaster.c:1416
int MyProcPid
Definition: globals.c:39
int errhint(const char *fmt,...)
Definition: elog.c:987
#define StartupDataBase()
Definition: postmaster.c:548
#define SIGTTOU
Definition: win32_port.h:175
#define DEBUG3
Definition: elog.h:23
#define SIGTTIN
Definition: win32_port.h:174
#define SIGUSR1
Definition: win32_port.h:177
TimestampTz GetCurrentTimestamp(void)
Definition: timestamp.c:1570
pqsigfunc pqsignal_no_restart(int signo, pqsigfunc func)
Definition: pqsignal.c:71
void on_proc_exit(pg_on_exit_callback function, Datum arg)
Definition: ipc.c:292
void AddToDataDirLockFile(int target_line, const char *str)
Definition: miscinit.c:1158
#define SIGCHLD
Definition: win32_port.h:173
int wal_level
Definition: xlog.c:104
char * pstrdup(const char *in)
Definition: mcxt.c:1076
#define pg_hton16(x)
Definition: pg_bswap.h:120
static void dummy_handler(SIGNAL_ARGS)
Definition: postmaster.c:5228
void ParseLongOption(const char *string, char **name, char **value)
Definition: guc.c:9397
pg_time_t MyStartTime
Definition: globals.c:40
bool set_plan_disabling_options(const char *arg, GucContext context, GucSource source)
Definition: postgres.c:3274
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:109
#define write_stderr(str)
Definition: parallel.c:182
#define S_IROTH
Definition: win32_port.h:295
static bool CreateOptsFile(int argc, char *argv[], char *fullprogname)
Definition: postmaster.c:5538
bool CheckDateTokenTables(void)
Definition: datetime.c:4464
int errcode(int sqlerrcode)
Definition: elog.c:575
#define LOG_METAINFO_DATAFILE
Definition: syslogger.h:94
const char * get_stats_option_name(const char *arg)
Definition: postgres.c:3316
int snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3
int SysLogger_Start(void)
Definition: syslogger.c:520
void set_debug_options(int debug_flag, GucContext context, GucSource source)
Definition: postgres.c:3245
#define SIGPIPE
Definition: win32_port.h:168
#define SIGUSR2
Definition: win32_port.h:178
#define LOG
Definition: elog.h:26
const char * progname
Definition: pg_standby.c:37
void list_free_deep(List *list)
Definition: list.c:1147
char * Unix_socket_directories
Definition: postmaster.c:198
bool IsBinaryUpgrade
Definition: globals.c:102
int getopt(int nargc, char *const *nargv, const char *ostr)
Definition: getopt.c:72
#define PG_SETMASK(mask)
Definition: pqsignal.h:19
bool load_ident(void)
Definition: hba.c:2899
void autovac_init(void)
Definition: autovacuum.c:3236
void pqinitmask(void)
Definition: pqsignal.c:41
static void CloseServerPorts(int status, Datum arg)
Definition: postmaster.c:1380
static void InitPostmasterDeathWatchHandle(void)
Definition: postmaster.c:6445
bool SplitDirectoriesString(char *rawstring, char separator, List **namelist)
Definition: varlena.c:3391
static void checkDataDir(void)
Definition: postmaster.c:1479
#define PM_STATUS_STARTING
Definition: pidfile.h:50
void pfree(void *pointer)
Definition: mcxt.c:949
int optind
Definition: getopt.c:51
#define S_IWUSR
Definition: win32_port.h:274
#define ERROR
Definition: elog.h:43
void CreateDataDirLockFile(bool amPostmaster)
Definition: miscinit.c:1081
static pid_t StartupPID
Definition: postmaster.c:248
int PostPortNumber
Definition: postmaster.c:195
int ReservedBackends
Definition: postmaster.c:212
static void ExitPostmaster(int status) pg_attribute_noreturn()
Definition: postmaster.c:5019
#define FATAL
Definition: elog.h:52
#define LOCK_FILE_LINE_SOCKET_DIR
Definition: pidfile.h:40
static struct @121 value
char * external_pid_file
Definition: guc.c:466
#define ALLOCSET_DEFAULT_SIZES
Definition: memutils.h:170
static bool success
Definition: pg_basebackup.c:99
Definition: dest.h:88
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
Definition: guc.c:6700
bool load_hba(void)
Definition: hba.c:2112
char * bonjour_name
Definition: postmaster.c:244
bool SplitIdentifierString(char *rawstring, char separator, List **namelist)
Definition: varlena.c:3264
int XLogArchiveMode
Definition: xlog.c:94
#define S_IRWXG
Definition: win32_port.h:292
int errcode_for_file_access(void)
Definition: elog.c:598
static pid_t SysLoggerPID
Definition: postmaster.c:256
#define SIGHUP
Definition: win32_port.h:163
void LocalProcessControlFile(bool reset)
Definition: xlog.c:4831
void ChangeToDataDir(void)
Definition: miscinit.c:116
int opterr
Definition: getopt.c:50
static void getInstallationPaths(const char *argv0)
Definition: postmaster.c:1428
char * Log_destination_string
Definition: elog.c:107
char * ListenAddresses
Definition: postmaster.c:201
int StreamServerPort(int family, char *hostName, unsigned short portNumber, char *unixSocketDir, pgsocket ListenSocket[], int MaxListen)
Definition: pqcomm.c:330
#define ereport(elevel, rest)
Definition: elog.h:122
#define STATUS_OK
Definition: c.h:953
MemoryContext TopMemoryContext
Definition: mcxt.c:43
static void pmdie(SIGNAL_ARGS)
Definition: postmaster.c:2644
static void SIGHUP_handler(SIGNAL_ARGS)
Definition: postmaster.c:2571
#define LOCK_FILE_LINE_LISTEN_ADDR
Definition: pidfile.h:41
bool enable_bonjour
Definition: postmaster.c:243
void RemovePromoteSignalFiles(void)
Definition: xlog.c:12108
int max_wal_senders
Definition: walsender.c:120
#define SIG_IGN
Definition: win32_port.h:160
pid_t PostmasterPid
Definition: globals.c:87
#define WARNING
Definition: elog.h:40
char my_exec_path[MAXPGPATH]
Definition: globals.c:64
sigset_t BlockSig
Definition: pqsignal.c:22
static pgsocket ListenSocket[MAXLISTEN]
Definition: postmaster.c:216
MemoryContext AllocSetContextCreate(MemoryContext parent, const char *name, Size minContextSize, Size initBlockSize, Size maxBlockSize)
Definition: aset.c:342
static PMState pmState
Definition: postmaster.c:339
bool SelectConfigFiles(const char *userDoption, const char *progname)
Definition: guc.c:4717
void ApplyLauncherRegister(void)
Definition: launcher.c:764
#define PGINVALID_SOCKET
Definition: port.h:33
int MaxConnections
Definition: globals.c:123
TimestampTz PgStartTime
Definition: timestamp.c:49
#define LOG_DESTINATION_STDERR
Definition: elog.h:395
static void reset_shared(int port)
Definition: postmaster.c:2553
static bool Reinit
Definition: postmaster.c:230
pqsigfunc pqsignal(int signum, pqsigfunc handler)
Definition: signal.c:168
#define free(a)
Definition: header.h:65
int errmsg_internal(const char *fmt,...)
Definition: elog.c:827
static char ExtraOptions[MAXPGPATH]
Definition: postmaster.c:221
static int ServerLoop(void)
Definition: postmaster.c:1673
#define Assert(condition)
Definition: c.h:670
#define lfirst(lc)
Definition: pg_list.h:106
void RemovePgTempFiles(void)
Definition: fd.c:3003
static void reaper(SIGNAL_ARGS)
Definition: postmaster.c:2823
void InitializeMaxBackends(void)
Definition: postinit.c:496
#define SIGALRM
Definition: win32_port.h:169
const char * name
Definition: encode.c:521
#define S_IRUSR
Definition: win32_port.h:271
static const char * userDoption
Definition: postgres.c:159
void set_max_safe_fds(void)
Definition: fd.c:895
int errmsg(const char *fmt,...)
Definition: elog.c:797
char * optarg
Definition: getopt.c:53
void list_free(List *list)
Definition: list.c:1133
int i
const char * strerror(int errnum)
Definition: strerror.c:19
static void sigusr1_handler(SIGNAL_ARGS)
Definition: postmaster.c:5052
void pgstat_init(void)
Definition: pgstat.c:355
void srandom(unsigned int seed)
Definition: srandom.c:22
int Log_destination
Definition: elog.c:106
char ** environ
#define elog
Definition: elog.h:219
CommandDest whereToSendOutput
Definition: postgres.c:88
static void static void status(const char *fmt,...) pg_attribute_printf(1
Definition: pg_regress.c:225
static int SendStop
Definition: postmaster.c:231
void process_shared_preload_libraries(void)
Definition: miscinit.c:1487
#define LOCK_FILE_LINE_PM_STATUS
Definition: pidfile.h:43
Definition: pg_list.h:45
#define MAXLISTEN
Definition: postmaster.c:215
static struct timeval random_start_time
Definition: postmaster.c:375
MemoryContext PostmasterContext
Definition: mcxt.c:45
#define S_IRWXO
Definition: win32_port.h:304
static void maybe_start_bgworkers(void)
Definition: postmaster.c:5862
void InitializeGUCOptions(void)
Definition: guc.c:4495

◆ PostmasterMarkPIDForWorkerNotify()

bool PostmasterMarkPIDForWorkerNotify ( int  )

Definition at line 5981 of file postmaster.c.

References AllocateFile(), Assert, AuxiliaryProcs, bkend::bgworker_notify, bkend::child_slot, closesocket, dlist_iter::cur, DataDir, generate_unaccent_rules::dest, dlist_container, dlist_foreach, bkend::elem, ereport, errmsg(), errmsg_internal(), ExtraOptions, first_syslogger_file_time, free, FreeFile(), i, IsBinaryUpgrade, ListenSocket, LOG, MainLWLockArray, max_safe_fds, MaxBackends, MaxLivePostmasterChildren(), MAXPGPATH, mul_size(), my_exec_path, MyCancelKey, MyPMChildSlot, NamedLWLockTrancheArray, NamedLWLockTrancheRequests, PG_BINARY_R, pg_queue_signal(), PGINVALID_SOCKET, PgReloadTime, PgStartTime, pgStatSock, pgwin32_create_signal_listener(), pgwin32_initial_signal_pipe, bkend::pid, pkglib_path, PMSignalState, postmaster_alive_fds, PostmasterPid, PreparedXactProcs, ProcGlobal, ProcStructLock, redirection_done, SetDataDir(), ShmemAlloc(), ShmemLock, ShmemVariableCache, SIGCHLD, Port::sock, SpinlockSemaArray, strerror(), strlcpy(), syslogPipe, TRUE, UsedShmemSegAddr, UsedShmemSegID, and write_stderr.

Referenced by BackgroundWorkerStateChange().

5982 {
5983  dlist_iter iter;
5984  Backend *bp;
5985 
5986  dlist_foreach(iter, &BackendList)
5987  {
5988  bp = dlist_container(Backend, elem, iter.cur);
5989  if (bp->pid == pid)
5990  {
5991  bp->bgworker_notify = true;
5992  return true;
5993  }
5994  }
5995  return false;
5996 }
#define dlist_foreach(iter, lhead)
Definition: ilist.h:507
bool bgworker_notify
Definition: postmaster.c:180
#define dlist_container(type, membername, ptr)
Definition: ilist.h:477
static dlist_head BackendList
Definition: postmaster.c:184
dlist_node * cur
Definition: ilist.h:161
pid_t pid
Definition: postmaster.c:169

Variable Documentation

◆ AuthenticationTimeout

int AuthenticationTimeout

Definition at line 237 of file postmaster.c.

Referenced by BackendInitialize(), and PerformAuthentication().

◆ bonjour_name

char* bonjour_name

Definition at line 244 of file postmaster.c.

Referenced by PostmasterMain().

◆ ClientAuthInProgress

◆ enable_bonjour

bool enable_bonjour

Definition at line 243 of file postmaster.c.

Referenced by PostmasterMain().

◆ EnableSSL

bool EnableSSL

Definition at line 234 of file postmaster.c.

Referenced by BackendRun(), parse_hba_line(), PostmasterMain(), and SIGHUP_handler().

◆ ListenAddresses

char* ListenAddresses

Definition at line 201 of file postmaster.c.

Referenced by PostmasterMain().

◆ Log_connections

bool Log_connections

Definition at line 240 of file postmaster.c.

Referenced by BackendInitialize(), and PerformAuthentication().

◆ log_hostname

bool log_hostname

Definition at line 239 of file postmaster.c.

Referenced by BackendInitialize().

◆ postmaster_alive_fds

◆ PostPortNumber

PGDLLIMPORT int PostPortNumber

Definition at line 195 of file postmaster.c.

Referenced by CreateLockFile(), PostmasterMain(), and PostmasterStateMachine().

◆ PreAuthDelay

int PreAuthDelay

Definition at line 236 of file postmaster.c.

Referenced by BackendInitialize().

◆ progname

PGDLLIMPORT const char* progname

Definition at line 37 of file pg_standby.c.

Referenced by _check_database_version(), _CloseArchive(), _connectDB(), AuxiliaryProcessMain(), BackendRun(), BaseBackup(), CheckCopyStreamStop(), checkDataDir(), CheckServerVersionForStreaming(), cleanup_directories_atexit(), CleanupPriorWALFiles(), close_destination_dir(), close_walfile(), connectDatabase(), ConnectDatabase(), CopyStreamPoll(), CopyStreamReceive(), CreateReplicationSlot(), CustomizableCleanupPriorWALFiles(), CustomizableInitialize(), dir_close(), dir_finish(), dir_open_for_write(), doConnect(), DropReplicationSlot(), escape_quotes(), FindStreamingStart(), GenerateRecoveryConf(), get_destination_dir(), get_progname(), GetConnection(), HandleCopyStream(), HandleEndOfCopyStream(), init_parallel_dump_utils(), Initialize(), LogStreamerMain(), main(), mark_file_as_archived(), open_walfile(), OutputFsync(), parse_max_rate(), PostgresMain(), PostmasterMain(), prepareToTerminate(), process_postgres_switches(), ProcessKeepaliveMsg(), ProcessXLogDataMsg(), reached_end_position(), ReadEndOfStreamingResult(), ReceiveAndUnpackTarFile(), ReceiveTarFile(), ReceiveXlogStream(), RetrieveWalSegSize(), RunIdentifySystem(), sendFeedback(), set_dump_section(), setup_cancel_handler(), SetWALFileNameForCleanup(), SetWALSegSize(), sigTermHandler(), StartLogStreamer(), stop_streaming(), StreamLog(), StreamLogicalLog(), syncTargetDirectory(), tablespace_list_append(), tar_finish(), usage(), verify_dir_is_empty_or_create(), vwrite_msg(), walkdir(), WriteRecoveryConf(), writeTarData(), and writeTimeLineHistoryFile().

◆ ReservedBackends

int ReservedBackends

Definition at line 212 of file postmaster.c.

Referenced by InitPostgres(), and PostmasterMain().

◆ restart_after_crash

bool restart_after_crash

Definition at line 245 of file postmaster.c.

Referenced by PostmasterStateMachine().

◆ Unix_socket_directories

char* Unix_socket_directories

Definition at line 198 of file postmaster.c.

Referenced by PostmasterMain().

◆ Unix_socket_group

char* Unix_socket_group

Definition at line 122 of file pqcomm.c.

Referenced by StreamServerPort().

◆ Unix_socket_permissions

int Unix_socket_permissions

Definition at line 121 of file pqcomm.c.

Referenced by show_unix_socket_permissions(), and StreamServerPort().