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 2440 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().

2441 {
2442  int i;
2443 
2444 #ifndef WIN32
2445 
2446  /*
2447  * Close the write end of postmaster death watch pipe. It's important to
2448  * do this as early as possible, so that if postmaster dies, others won't
2449  * think that it's still running because we're holding the pipe open.
2450  */
2452  ereport(FATAL,
2454  errmsg_internal("could not close postmaster death monitoring pipe in child process: %m")));
2456 #endif
2457 
2458  /* Close the listen sockets */
2459  for (i = 0; i < MAXLISTEN; i++)
2460  {
2461  if (ListenSocket[i] != PGINVALID_SOCKET)
2462  {
2465  }
2466  }
2467 
2468  /* If using syslogger, close the read side of the pipe */
2469  if (!am_syslogger)
2470  {
2471 #ifndef WIN32
2472  if (syslogPipe[0] >= 0)
2473  close(syslogPipe[0]);
2474  syslogPipe[0] = -1;
2475 #else
2476  if (syslogPipe[0])
2477  CloseHandle(syslogPipe[0]);
2478  syslogPipe[0] = 0;
2479 #endif
2480  }
2481 
2482 #ifdef USE_BONJOUR
2483  /* If using Bonjour, close the connection to the mDNS daemon */
2484  if (bonjour_sdref)
2485  close(DNSServiceRefSockFD(bonjour_sdref));
2486 #endif
2487 }
void StreamClose(pgsocket sock)
Definition: pqcomm.c:844
#define FATAL
Definition: elog.h:52
bool am_syslogger
Definition: syslogger.c:75
#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:565
static pgsocket ListenSocket[MAXLISTEN]
Definition: postmaster.c:217
#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:216
int syslogPipe[2]
Definition: syslogger.c:113

◆ GetNumShmemAttachedBgworkers()

int GetNumShmemAttachedBgworkers ( void  )

◆ MaxLivePostmasterChildren()

int MaxLivePostmasterChildren ( void  )

Definition at line 5527 of file postmaster.c.

References autovacuum_max_workers, max_worker_processes, and MaxConnections.

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

5528 {
5529  return 2 * (MaxConnections + autovacuum_max_workers + 1 +
5531 }
int MaxConnections
Definition: globals.c:133
int autovacuum_max_workers
Definition: autovacuum.c:114
int max_worker_processes
Definition: globals.c:134

◆ PostmasterMain()

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

Definition at line 575 of file postmaster.c.

References AddToDataDirLockFile(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ApplyLauncherRegister(), ARCHIVE_MODE_OFF, Assert, autovac_init(), BlockSig, bonjour_name, ChangeToDataDir(), checkControlFile(), 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_MODE_MASK_OWNER, 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_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().

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

◆ PostmasterMarkPIDForWorkerNotify()

bool PostmasterMarkPIDForWorkerNotify ( int  )

Definition at line 5930 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().

5931 {
5932  dlist_iter iter;
5933  Backend *bp;
5934 
5935  dlist_foreach(iter, &BackendList)
5936  {
5937  bp = dlist_container(Backend, elem, iter.cur);
5938  if (bp->pid == pid)
5939  {
5940  bp->bgworker_notify = true;
5941  return true;
5942  }
5943  }
5944  return false;
5945 }
#define dlist_foreach(iter, lhead)
Definition: ilist.h:507
bool bgworker_notify
Definition: postmaster.c:181
#define dlist_container(type, membername, ptr)
Definition: ilist.h:477
static dlist_head BackendList
Definition: postmaster.c:185
dlist_node * cur
Definition: ilist.h:161
pid_t pid
Definition: postmaster.c:170

Variable Documentation

◆ AuthenticationTimeout

int AuthenticationTimeout

Definition at line 238 of file postmaster.c.

Referenced by BackendInitialize(), and PerformAuthentication().

◆ bonjour_name

char* bonjour_name

Definition at line 245 of file postmaster.c.

Referenced by PostmasterMain().

◆ ClientAuthInProgress

◆ enable_bonjour

bool enable_bonjour

Definition at line 244 of file postmaster.c.

Referenced by PostmasterMain().

◆ EnableSSL

bool EnableSSL

Definition at line 235 of file postmaster.c.

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

◆ ListenAddresses

char* ListenAddresses

Definition at line 202 of file postmaster.c.

Referenced by PostmasterMain().

◆ Log_connections

bool Log_connections

Definition at line 241 of file postmaster.c.

Referenced by BackendInitialize(), and PerformAuthentication().

◆ log_hostname

bool log_hostname

Definition at line 240 of file postmaster.c.

Referenced by BackendInitialize().

◆ postmaster_alive_fds

◆ PostPortNumber

PGDLLIMPORT int PostPortNumber

Definition at line 196 of file postmaster.c.

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

◆ PreAuthDelay

int PreAuthDelay

Definition at line 237 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(), checkControlFile(), CheckCopyStreamStop(), 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(), RetrieveDataDirCreatePerm(), 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 213 of file postmaster.c.

Referenced by InitPostgres(), and PostmasterMain().

◆ restart_after_crash

bool restart_after_crash

Definition at line 246 of file postmaster.c.

Referenced by PostmasterStateMachine().

◆ Unix_socket_directories

char* Unix_socket_directories

Definition at line 199 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().