494{
495 int opt;
496 int status;
498 bool listen_addr_saved = false;
499 char *output_config_variable = NULL;
500
502
504
506
507 /*
508 * Start our win32 signal implementation
509 */
510#ifdef WIN32
512#endif
513
514 /*
515 * We should not be creating any files or directories before we check the
516 * data directory (see checkDataDir()), but just in case set the umask to
517 * the most restrictive (owner-only) permissions.
518 *
519 * checkDataDir() will reset the umask based on the data directory
520 * permissions.
521 */
523
524 /*
525 * By default, palloc() requests in the postmaster will be allocated in
526 * the PostmasterContext, which is space that can be recycled by backends.
527 * Allocated data that needs to be available to backends should be
528 * allocated in TopMemoryContext.
529 */
531 "Postmaster",
534
535 /* Initialize paths to installation files */
537
538 /*
539 * Set up signal handlers for the postmaster process.
540 *
541 * CAUTION: when changing this list, check for side-effects on the signal
542 * handling setup of child processes. See tcop/postgres.c,
543 * bootstrap/bootstrap.c, postmaster/bgwriter.c, postmaster/walwriter.c,
544 * postmaster/autovacuum.c, postmaster/pgarch.c, postmaster/syslogger.c,
545 * postmaster/bgworker.c and postmaster/checkpointer.c.
546 */
548 sigprocmask(SIG_SETMASK, &
BlockSig, NULL);
549
559
560 /* This may configure SIGURG, depending on platform. */
563
564 /*
565 * No other place in Postgres should touch SIGTTIN/SIGTTOU handling. We
566 * ignore those signals in a postmaster environment, so that there is no
567 * risk of a child process freezing up due to writing to stderr. But for
568 * a standalone backend, their default handling is reasonable. Hence, all
569 * child processes should just allow the inherited settings to stand.
570 */
571#ifdef SIGTTIN
572 pqsignal(SIGTTIN, SIG_IGN);
/* ignored */
573#endif
574#ifdef SIGTTOU
575 pqsignal(SIGTTOU, SIG_IGN);
/* ignored */
576#endif
577
578 /* ignore SIGXFSZ, so that ulimit violations work like disk full */
579#ifdef SIGXFSZ
580 pqsignal(SIGXFSZ, SIG_IGN);
/* ignored */
581#endif
582
583 /* Begin accepting signals. */
585
586 /*
587 * Options setup
588 */
590
592
593 /*
594 * Parse command-line options. CAUTION: keep this in sync with
595 * tcop/postgres.c (the option sets should not conflict) and with the
596 * common help() function in main/main.c.
597 */
598 while ((opt =
getopt(argc, argv,
"B:bC:c:D:d:EeFf:h:ijk:lN:OPp:r:S:sTt:W:-:")) != -1)
599 {
600 switch (opt)
601 {
602 case 'B':
604 break;
605
606 case 'b':
607 /* Undocumented flag used for binary upgrades */
609 break;
610
611 case 'C':
612 output_config_variable = strdup(
optarg);
613 break;
614
615 case '-':
616
617 /*
618 * Error if the user misplaced a special must-be-first option
619 * for dispatching to a subprogram. parse_dispatch_option()
620 * returns DISPATCH_POSTMASTER if it doesn't find a match, so
621 * error for anything else.
622 */
625 (
errcode(ERRCODE_SYNTAX_ERROR),
627
628 /* FALLTHROUGH */
629 case 'c':
630 {
633
636 {
637 if (opt == '-')
639 (
errcode(ERRCODE_SYNTAX_ERROR),
640 errmsg(
"--%s requires a value",
642 else
644 (
errcode(ERRCODE_SYNTAX_ERROR),
645 errmsg(
"-c %s requires a value",
647 }
648
652 break;
653 }
654
655 case 'D':
657 break;
658
659 case 'd':
661 break;
662
663 case 'E':
665 break;
666
667 case 'e':
669 break;
670
671 case 'F':
673 break;
674
675 case 'f':
677 {
678 write_stderr(
"%s: invalid argument for option -f: \"%s\"\n",
681 }
682 break;
683
684 case 'h':
686 break;
687
688 case 'i':
690 break;
691
692 case 'j':
693 /* only used by interactive backend */
694 break;
695
696 case 'k':
698 break;
699
700 case 'l':
702 break;
703
704 case 'N':
706 break;
707
708 case 'O':
710 break;
711
712 case 'P':
714 break;
715
716 case 'p':
718 break;
719
720 case 'r':
721 /* only used by single-user backend */
722 break;
723
724 case 'S':
726 break;
727
728 case 's':
730 break;
731
732 case 'T':
733
734 /*
735 * This option used to be defined as sending SIGSTOP after a
736 * backend crash, but sending SIGABRT seems more useful.
737 */
739 break;
740
741 case 't':
742 {
744
745 if (tmp)
746 {
748 }
749 else
750 {
751 write_stderr(
"%s: invalid argument for option -t: \"%s\"\n",
754 }
755 break;
756 }
757
758 case 'W':
760 break;
761
762 default:
763 write_stderr(
"Try \"%s --help\" for more information.\n",
766 }
767 }
768
769 /*
770 * Postmaster accepts no non-option switch arguments.
771 */
773 {
776 write_stderr(
"Try \"%s --help\" for more information.\n",
779 }
780
781 /*
782 * Locate the proper configuration files and data directory, and read
783 * postgresql.conf for the first time.
784 */
787
788 if (output_config_variable != NULL)
789 {
790 /*
791 * If this is a runtime-computed GUC, it hasn't yet been initialized,
792 * and the present value is not useful. However, this is a convenient
793 * place to print the value for most GUCs because it is safe to run
794 * postmaster startup to this point even if the server is already
795 * running. For the handful of runtime-computed GUCs that we cannot
796 * provide meaningful values for yet, we wait until later in
797 * postmaster startup to print the value. We won't be able to use -C
798 * on running servers for those GUCs, but using this option now would
799 * lead to incorrect results for them.
800 */
802
804 {
805 /*
806 * "-C guc" was specified, so print GUC's value and exit. No
807 * extra permission check is needed because the user is reading
808 * inside the data dir.
809 */
811 false, false);
812
813 puts(config_val ? config_val : "");
815 }
816
817 /*
818 * A runtime-computed GUC will be printed later on. As we initialize
819 * a server startup sequence, silence any log messages that may show
820 * up in the output generated. FATAL and more severe messages are
821 * useful to show, even if one would only expect at least PANIC. LOG
822 * entries are hidden.
823 */
826 }
827
828 /* Verify that DataDir looks reasonable */
830
831 /* Check that pg_control exists */
833
834 /* And switch working directory into it */
836
837 /*
838 * Check for invalid combinations of GUC settings.
839 */
841 {
842 write_stderr(
"%s: \"superuser_reserved_connections\" (%d) plus \"reserved_connections\" (%d) must be less than \"max_connections\" (%d)\n",
847 }
850 (
errmsg(
"WAL archival cannot be enabled when \"wal_level\" is \"minimal\"")));
853 (
errmsg(
"WAL streaming (\"max_wal_senders\" > 0) requires \"wal_level\" to be \"replica\" or \"logical\"")));
856 (
errmsg(
"WAL cannot be summarized when \"wal_level\" is \"minimal\"")));
859 (
errmsg(
"replication slot synchronization (\"sync_replication_slots\" = on) requires \"wal_level\" >= \"logical\"")));
860
861 /*
862 * Other one-time internal sanity checks can go here, if they are fast.
863 * (Put any slow processing further down, after postmaster.pid creation.)
864 */
866 {
869 }
870
871 /*
872 * Now that we are done processing the postmaster arguments, reset
873 * getopt(3) library so that it will work correctly in subprocesses.
874 */
876#ifdef HAVE_INT_OPTRESET
877 optreset = 1; /* some systems need this too */
878#endif
879
880 /* For debugging: display postmaster environment */
882 {
883#if !defined(WIN32) || defined(_MSC_VER)
885#endif
886 char **p;
888
890
894
897 }
898
899 /*
900 * Create lockfile for data directory.
901 *
902 * We want to do this before we try to grab the input sockets, because the
903 * data directory interlock is more reliable than the socket-file
904 * interlock (thanks to whoever decided to put socket files in /tmp :-().
905 * For the same reason, it's best to grab the TCP socket(s) before the
906 * Unix socket(s).
907 *
908 * Also note that this internally sets up the on_proc_exit function that
909 * is responsible for removing both data directory and socket lockfiles;
910 * so it must happen before opening sockets so that at exit, the socket
911 * lockfiles go away after CloseServerPorts runs.
912 */
914
915 /*
916 * Read the control file (for error checking and config info).
917 *
918 * Since we verify the control file's CRC, this has a useful side effect
919 * on machines where we need a run-time test for CRC support instructions.
920 * The postmaster will do the test once at startup, and then its child
921 * processes will inherit the correct function pointer and not need to
922 * repeat the test.
923 */
925
926 /*
927 * Register the apply launcher. It's probably a good idea to call this
928 * before any modules had a chance to take the background worker slots.
929 */
931
932 /*
933 * process any libraries that should be preloaded at postmaster start
934 */
936
937 /*
938 * Initialize SSL library, if specified.
939 */
940#ifdef USE_SSL
942 {
945 }
946#endif
947
948 /*
949 * Now that loadable modules have had their chance to alter any GUCs,
950 * calculate MaxBackends and initialize the machinery to track child
951 * processes.
952 */
955
956 /*
957 * Calculate the size of the PGPROC fast-path lock arrays.
958 */
960
961 /*
962 * Give preloaded libraries a chance to request additional shared memory.
963 */
965
966 /*
967 * Now that loadable modules have had their chance to request additional
968 * shared memory, determine the value of any runtime-computed GUCs that
969 * depend on the amount of shared memory required.
970 */
972
973 /*
974 * Now that modules have been loaded, we can process any custom resource
975 * managers specified in the wal_consistency_checking GUC.
976 */
978
979 /*
980 * If -C was specified with a runtime-computed GUC, we held off printing
981 * the value earlier, as the GUC was not yet initialized. We handle -C
982 * for most GUCs before we lock the data directory so that the option may
983 * be used on a running server. However, a handful of GUCs are runtime-
984 * computed and do not have meaningful values until after locking the data
985 * directory, and we cannot safely calculate their values earlier on a
986 * running server. At this point, such GUCs should be properly
987 * initialized, and we haven't yet set up shared memory, so this is a good
988 * time to handle the -C option for these special GUCs.
989 */
990 if (output_config_variable != NULL)
991 {
993 false, false);
994
995 puts(config_val ? config_val : "");
997 }
998
999 /*
1000 * Set up shared memory and semaphores.
1001 *
1002 * Note: if using SysV shmem and/or semas, each postmaster startup will
1003 * normally choose the same IPC keys. This helps ensure that we will
1004 * clean up dead IPC objects if the postmaster crashes and is restarted.
1005 */
1007
1008 /*
1009 * Estimate number of openable files. This must happen after setting up
1010 * semaphores, because on some platforms semaphores count as open files.
1011 */
1013
1014 /*
1015 * Initialize pipe (or process handle on Windows) that allows children to
1016 * wake up from sleep on postmaster death.
1017 */
1019
1020#ifdef WIN32
1021
1022 /*
1023 * Initialize I/O completion port used to deliver list of dead children.
1024 */
1025 win32ChildQueue = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1);
1026 if (win32ChildQueue == NULL)
1028 (
errmsg(
"could not create I/O completion port for child queue")));
1029#endif
1030
1031#ifdef EXEC_BACKEND
1032 /* Write out nondefault GUC settings for child processes to use */
1034
1035 /*
1036 * Clean out the temp directory used to transmit parameters to child
1037 * processes (see internal_forkexec). We must do this before launching
1038 * any child processes, else we have a race condition: we could remove a
1039 * parameter file before the child can read it. It should be safe to do
1040 * so now, because we verified earlier that there are no conflicting
1041 * Postgres processes in this data directory.
1042 */
1044#endif
1045
1046 /*
1047 * Forcibly remove the files signaling a standby promotion request.
1048 * Otherwise, the existence of those files triggers a promotion too early,
1049 * whether a user wants that or not.
1050 *
1051 * This removal of files is usually unnecessary because they can exist
1052 * only during a few moments during a standby promotion. However there is
1053 * a race condition: if pg_ctl promote is executed and creates the files
1054 * during a promotion, the files can stay around even after the server is
1055 * brought up to be the primary. Then, if a new standby starts by using
1056 * the backup taken from the new primary, the files can exist at server
1057 * startup and must be removed in order to avoid an unexpected promotion.
1058 *
1059 * Note that promotion signal files need to be removed before the startup
1060 * process is invoked. Because, after that, they can be used by
1061 * postmaster's SIGUSR1 signal handler.
1062 */
1064
1065 /* Do the same for logrotate signal file */
1067
1068 /* Remove any outdated file holding the current log filenames. */
1072 errmsg(
"could not remove file \"%s\": %m",
1074
1075 /*
1076 * If enabled, start up syslogger collection subprocess
1077 */
1080
1081 /*
1082 * Reset whereToSendOutput from DestDebug (its starting state) to
1083 * DestNone. This stops ereport from sending log messages to stderr unless
1084 * Log_destination permits. We don't do this until the postmaster is
1085 * fully launched, since startup failures may as well be reported to
1086 * stderr.
1087 *
1088 * If we are in fact disabling logging to stderr, first emit a log message
1089 * saying so, to provide a breadcrumb trail for users who may not remember
1090 * that their logging is configured to go somewhere else.
1091 */
1094 (
errmsg(
"ending log output to stderr"),
1095 errhint(
"Future log output will go to log destination \"%s\".",
1097
1099
1100 /*
1101 * Report server startup in log. While we could emit this much earlier,
1102 * it seems best to do so after starting the log collector, if we intend
1103 * to use one.
1104 */
1106 (
errmsg(
"starting %s", PG_VERSION_STR)));
1107
1108 /*
1109 * Establish input sockets.
1110 *
1111 * First set up an on_proc_exit function that's charged with closing the
1112 * sockets again at postmaster shutdown.
1113 */
1116
1118 {
1119 char *rawstring;
1123
1124 /* Need a modifiable copy of ListenAddresses */
1126
1127 /* Parse string into list of hostnames */
1129 {
1130 /* syntax error in list */
1132 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1133 errmsg(
"invalid list syntax in parameter \"%s\"",
1134 "listen_addresses")));
1135 }
1136
1137 foreach(l, elemlist)
1138 {
1139 char *curhost = (
char *)
lfirst(l);
1140
1141 if (strcmp(curhost, "*") == 0)
1144 NULL,
1148 else
1151 NULL,
1155
1157 {
1159 /* record the first successful host addr in lockfile */
1160 if (!listen_addr_saved)
1161 {
1163 listen_addr_saved = true;
1164 }
1165 }
1166 else
1168 (
errmsg(
"could not create listen socket for \"%s\"",
1169 curhost)));
1170 }
1171
1174 (
errmsg(
"could not create any TCP/IP sockets")));
1175
1178 }
1179
1180#ifdef USE_BONJOUR
1181 /* Register for Bonjour only if we opened TCP socket(s) */
1183 {
1184 DNSServiceErrorType
err;
1185
1186 /*
1187 * We pass 0 for interface_index, which will result in registering on
1188 * all "applicable" interfaces. It's not entirely clear from the
1189 * DNS-SD docs whether this would be appropriate if we have bound to
1190 * just a subset of the available network interfaces.
1191 */
1192 err = DNSServiceRegister(&bonjour_sdref,
1193 0,
1194 0,
1196 "_postgresql._tcp.",
1197 NULL,
1198 NULL,
1200 0,
1201 NULL,
1202 NULL,
1203 NULL);
1204 if (
err != kDNSServiceErr_NoError)
1206 (
errmsg(
"DNSServiceRegister() failed: error code %ld",
1208
1209 /*
1210 * We don't bother to read the mDNS daemon's reply, and we expect that
1211 * it will automatically terminate our registration when the socket is
1212 * closed at postmaster termination. So there's nothing more to be
1213 * done here. However, the bonjour_sdref is kept around so that
1214 * forked children can close their copies of the socket.
1215 */
1216 }
1217#endif
1218
1220 {
1221 char *rawstring;
1225
1226 /* Need a modifiable copy of Unix_socket_directories */
1228
1229 /* Parse string into list of directories */
1231 {
1232 /* syntax error in list */
1234 (
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1235 errmsg(
"invalid list syntax in parameter \"%s\"",
1236 "unix_socket_directories")));
1237 }
1238
1239 foreach(l, elemlist)
1240 {
1241 char *socketdir = (
char *)
lfirst(l);
1242
1245 socketdir,
1249
1251 {
1253 /* record the first successful Unix socket in lockfile */
1256 }
1257 else
1259 (
errmsg(
"could not create Unix-domain socket in directory \"%s\"",
1260 socketdir)));
1261 }
1262
1265 (
errmsg(
"could not create any Unix-domain sockets")));
1266
1269 }
1270
1271 /*
1272 * check that we have some socket to listen on
1273 */
1276 (
errmsg(
"no socket created for listening")));
1277
1278 /*
1279 * If no valid TCP ports, write an empty line for listen address,
1280 * indicating the Unix socket must be used. Note that this line is not
1281 * added to the lock file until there is a socket backing it.
1282 */
1283 if (!listen_addr_saved)
1285
1286 /*
1287 * Record postmaster options. We delay this till now to avoid recording
1288 * bogus options (eg, unusable port number).
1289 */
1292
1293 /*
1294 * Write the external PID file if requested
1295 */
1297 {
1299
1300 if (fpidfile)
1301 {
1303 fclose(fpidfile);
1304
1305 /* Make PID file world readable */
1307 write_stderr(
"%s: could not change permissions of external PID file \"%s\": %m\n",
1309 }
1310 else
1311 write_stderr(
"%s: could not write external PID file \"%s\": %m\n",
1313
1315 }
1316
1317 /*
1318 * Remove old temporary files. At this point there can be no other
1319 * Postgres processes running in this directory, so this should be safe.
1320 */
1322
1323 /*
1324 * Initialize the autovacuum subsystem (again, no process start yet)
1325 */
1327
1328 /*
1329 * Load configuration files for client authentication.
1330 */
1332 {
1333 /*
1334 * It makes no sense to continue if we fail to load the HBA file,
1335 * since there is no way to connect to the database in this case.
1336 */
1338 /* translator: %s is a configuration file */
1340 }
1342 {
1343 /*
1344 * We can start up without the IDENT file, although it means that you
1345 * cannot log in using any of the authentication methods that need a
1346 * user name mapping. load_ident() already logged the details of error
1347 * to the log.
1348 */
1349 }
1350
1351#ifdef HAVE_PTHREAD_IS_THREADED_NP
1352
1353 /*
1354 * On macOS, libintl replaces setlocale() with a version that calls
1355 * CFLocaleCopyCurrent() when its second argument is "" and every relevant
1356 * environment variable is unset or empty. CFLocaleCopyCurrent() makes
1357 * the process multithreaded. The postmaster calls sigprocmask() and
1358 * calls fork() without an immediate exec(), both of which have undefined
1359 * behavior in a multithreaded program. A multithreaded postmaster is the
1360 * normal case on Windows, which offers neither fork() nor sigprocmask().
1361 * Currently, macOS is the only platform having pthread_is_threaded_np(),
1362 * so we need not worry whether this HINT is appropriate elsewhere.
1363 */
1364 if (pthread_is_threaded_np() != 0)
1366 (
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
1367 errmsg(
"postmaster became multithreaded during startup"),
1368 errhint(
"Set the LC_ALL environment variable to a valid locale.")));
1369#endif
1370
1371 /*
1372 * Remember postmaster startup time
1373 */
1375
1376 /*
1377 * Report postmaster status in the postmaster.pid file, to allow pg_ctl to
1378 * see what's happening.
1379 */
1381
1383
1384 /* Make sure we can perform I/O while starting up. */
1386
1387 /* Start bgwriter and checkpointer so they can help with recovery */
1392
1393 /*
1394 * We're ready to rock and roll...
1395 */
1399
1400 /* Some workers may be scheduled to start now */
1402
1404
1405 /*
1406 * ServerLoop probably shouldn't ever return, but if it does, close down.
1407 */
1409
1410 abort(); /* not reached */
1411}
bool CheckDateTokenTables(void)
int secure_initialize(bool isServerStart)
#define write_stderr(str)
#define fprintf(file, fmt, msg)
int errhint(const char *fmt,...)
bool message_level_is_interesting(int elevel)
char * Log_destination_string
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define LOG_DESTINATION_STDERR
void err(int eval, const char *fmt,...)
void RemovePgTempFilesInDir(const char *tmpdirname, bool missing_ok, bool unlink_all)
void RemovePgTempFiles(void)
void set_max_safe_fds(void)
#define PG_MODE_MASK_OWNER
#define PG_TEMP_FILES_DIR
char my_exec_path[MAXPGPATH]
void SetConfigOption(const char *name, const char *value, GucContext context, GucSource source)
const char * GetConfigOption(const char *name, bool missing_ok, bool restrict_privileged)
bool SelectConfigFiles(const char *userDoption, const char *progname)
void ParseLongOption(const char *string, char **name, char **value)
void InitializeGUCOptions(void)
int GetConfigOptionFlags(const char *name, bool missing_ok)
#define GUC_RUNTIME_COMPUTED
void on_proc_exit(pg_on_exit_callback function, Datum arg)
void InitializeShmemGUCs(void)
void CreateSharedMemoryAndSemaphores(void)
void ApplyLauncherRegister(void)
void list_free(List *list)
void list_free_deep(List *list)
DispatchOption parse_dispatch_option(const char *name)
char * pstrdup(const char *in)
MemoryContext PostmasterContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
void ChangeToDataDir(void)
void process_shmem_requests(void)
void AddToDataDirLockFile(int target_line, const char *str)
void InitProcessLocalLatch(void)
void process_shared_preload_libraries(void)
void CreateDataDirLockFile(bool amPostmaster)
int getopt(int nargc, char *const *nargv, const char *ostr)
PGDLLIMPORT char * optarg
#define PM_STATUS_STARTING
#define LOCK_FILE_LINE_LISTEN_ADDR
#define LOCK_FILE_LINE_PM_STATUS
#define LOCK_FILE_LINE_SOCKET_DIR
void InitPostmasterChildSlots(void)
void set_debug_options(int debug_flag, GucContext context, GucSource source)
CommandDest whereToSendOutput
bool set_plan_disabling_options(const char *arg, GucContext context, GucSource source)
const char * get_stats_option_name(const char *arg)
static const char * userDoption
void InitializeMaxBackends(void)
void InitializeFastPathLocks(void)
static void handle_pm_shutdown_request_signal(SIGNAL_ARGS)
static void maybe_start_bgworkers(void)
static void CloseServerPorts(int status, Datum arg)
static void InitPostmasterDeathWatchHandle(void)
void InitProcessGlobals(void)
static void handle_pm_reload_request_signal(SIGNAL_ARGS)
static void StartSysLogger(void)
static int ServerLoop(void)
static PMChild * BgWriterPMChild
static void checkControlFile(void)
static PMChild * StartChildProcess(BackendType type)
static void handle_pm_pmsignal_signal(SIGNAL_ARGS)
static void maybe_adjust_io_workers(void)
static void UpdatePMState(PMState newState)
static PMChild * StartupPMChild
char * Unix_socket_directories
static bool CreateOptsFile(int argc, char *argv[], char *fullprogname)
static pg_noreturn void ExitPostmaster(int status)
static void handle_pm_child_exit_signal(SIGNAL_ARGS)
static void getInstallationPaths(const char *argv0)
static void unlink_external_pid_file(int status, Datum arg)
static StartupStatusEnum StartupStatus
static void dummy_handler(SIGNAL_ARGS)
static PMChild * CheckpointerPMChild
int SuperuserReservedConnections
PGDLLIMPORT bool LoadedSSL
int ListenServerPort(int family, const char *hostName, unsigned short portNumber, const char *unixSocketDir, pgsocket ListenSockets[], int *NumListenSockets, int MaxListen)
void pgwin32_signal_initialize(void)
bool sync_replication_slots
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void initStringInfo(StringInfo str)
void RemoveLogrotateSignalFiles(void)
#define LOG_METAINFO_DATAFILE
bool SplitDirectoriesString(char *rawstring, char separator, List **namelist)
bool SplitGUCList(char *rawstring, char separator, List **namelist)
void InitializeWaitEventSupport(void)
void InitializeWalConsistencyChecking(void)
void LocalProcessControlFile(bool reset)
void RemovePromoteSignalFiles(void)