diff options
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 1fabbce517f..41c4b41a945 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2,7 +2,7 @@ * * postmaster.c * This program acts as a clearing house for requests to the - * POSTGRES system. Frontend programs send a startup message + * POSTGRES system. Frontend programs send a startup message * to the Postmaster and the postmaster uses the info in the * message to setup a backend process. * @@ -15,7 +15,7 @@ * The postmaster process creates the shared memory and semaphore * pools during startup, but as a rule does not touch them itself. * In particular, it is not a member of the PGPROC array of backends - * and so it cannot participate in lock-manager operations. Keeping + * and so it cannot participate in lock-manager operations. Keeping * the postmaster away from shared memory operations makes it simpler * and more reliable. The postmaster is almost always able to recover * from crashes of individual backends by resetting shared memory; @@ -58,7 +58,7 @@ * Error Reporting: * Use write_stderr() only for reporting "interactive" errors * (essentially, bogus arguments on the command line). Once the - * postmaster is launched, use ereport(). In particular, don't use + * postmaster is launched, use ereport(). In particular, don't use * write_stderr() for anything that occurs after pmdaemonize. * *------------------------------------------------------------------------- @@ -132,10 +132,10 @@ * children we have and send them appropriate signals when necessary. * * "Special" children such as the startup, bgwriter and autovacuum launcher - * tasks are not in this list. Autovacuum worker and walsender processes are + * tasks are not in this list. Autovacuum worker and walsender processes are * in it. Also, "dead_end" children are in it: these are children launched just * for the purpose of sending a friendly rejection message to a would-be - * client. We must track them because they are attached to shared memory, + * client. We must track them because they are attached to shared memory, * but we know they will never become live backends. dead_end children are * not assigned a PMChildSlot. */ @@ -182,10 +182,10 @@ static char ExtraOptions[MAXPGPATH]; /* * These globals control the behavior of the postmaster in case some - * backend dumps core. Normally, it kills all peers of the dead backend + * backend dumps core. Normally, it kills all peers of the dead backend * and reinitializes shared memory. By specifying -s or -n, we can have * the postmaster stop (rather than kill) peers and not reinitialize - * shared data structures. (Reinit is currently dead code, though.) + * shared data structures. (Reinit is currently dead code, though.) */ static bool Reinit = true; static int SendStop = false; @@ -233,13 +233,13 @@ static bool RecoveryError = false; /* T if WAL recovery failed */ * state and the startup process is launched. The startup process begins by * reading the control file and other preliminary initialization steps. * In a normal startup, or after crash recovery, the startup process exits - * with exit code 0 and we switch to PM_RUN state. However, archive recovery + * with exit code 0 and we switch to PM_RUN state. However, archive recovery * is handled specially since it takes much longer and we would like to support * hot standby during archive recovery. * * When the startup process is ready to start archive recovery, it signals the * postmaster, and we switch to PM_RECOVERY state. The background writer is - * launched, while the startup process continues applying WAL. If Hot Standby + * launched, while the startup process continues applying WAL. If Hot Standby * is enabled, then, after reaching a consistent point in WAL redo, startup * process signals us again, and we switch to PM_HOT_STANDBY state and * begin accepting connections to perform read-only queries. When archive @@ -551,7 +551,7 @@ PostmasterMain(int argc, char *argv[]) opterr = 1; /* - * Parse command-line options. CAUTION: keep this in sync with + * Parse command-line options. CAUTION: keep this in sync with * tcop/postgres.c (the option sets should not conflict) and with the * common help() function in main/main.c. */ @@ -829,7 +829,7 @@ PostmasterMain(int argc, char *argv[]) CreateDataDirLockFile(true); /* - * If timezone is not set, determine what the OS uses. (In theory this + * If timezone is not set, determine what the OS uses. (In theory this * should be done during GUC initialization, but because it can take as * much as several seconds, we delay it until after we've created the * postmaster.pid file. This prevents problems with boot scripts that @@ -1100,7 +1100,7 @@ PostmasterMain(int argc, char *argv[]) load_ident(); /* - * Remove old temporary files. At this point there can be no other + * Remove old temporary files. At this point there can be no other * Postgres processes running in this directory, so this should be safe. */ RemovePgTempFiles(); @@ -1347,7 +1347,7 @@ pmdaemonize(void) /* * Reassociate stdin/stdout/stderr. fork_process() cleared any pending - * output, so this should be safe. The only plausible error is EINTR, + * output, so this should be safe. The only plausible error is EINTR, * which just means we should retry. */ do @@ -1590,7 +1590,7 @@ ProcessStartupPacket(Port *port, bool SSLdone) { /* * EOF after SSLdone probably means the client didn't like our - * response to NEGOTIATE_SSL_CODE. That's not an error condition, so + * response to NEGOTIATE_SSL_CODE. That's not an error condition, so * don't clutter the log with a complaint. */ if (!SSLdone) @@ -1715,7 +1715,7 @@ retry1: int32 offset = sizeof(ProtocolVersion); /* - * Scan packet body for name/option pairs. We can assume any string + * Scan packet body for name/option pairs. We can assume any string * beginning within the packet body is null-terminated, thanks to * zeroing extra byte above. */ @@ -2121,7 +2121,7 @@ reset_shared(int port) * * Note: in each "cycle of life" we will normally assign the same IPC keys * (if using SysV shmem and/or semas), since the port number is used to - * determine IPC keys. This helps ensure that we will clean up dead IPC + * determine IPC keys. This helps ensure that we will clean up dead IPC * objects if the postmaster crashes and is restarted. */ CreateSharedMemoryAndSemaphores(false, port); @@ -2460,7 +2460,7 @@ reaper(SIGNAL_ARGS) /* * OK, we saw normal exit of the bgwriter after it's been told * to shut down. We expect that it wrote a shutdown - * checkpoint. (If for some reason it didn't, recovery will + * checkpoint. (If for some reason it didn't, recovery will * occur on next postmaster start.) * * At this point we should have no normal backend children @@ -2536,7 +2536,7 @@ reaper(SIGNAL_ARGS) /* * Was it the autovacuum launcher? Normal exit can be ignored; we'll * start a new one at the next iteration of the postmaster's main - * loop, if necessary. Any other exit condition is treated as a + * loop, if necessary. Any other exit condition is treated as a * crash. */ if (pid == AutoVacPID) @@ -2665,7 +2665,7 @@ CleanupBackend(int pid, if (!ReleasePostmasterChildSlot(bp->child_slot)) { /* - * Uh-oh, the child failed to clean itself up. Treat as a + * Uh-oh, the child failed to clean itself up. Treat as a * crash after all. */ HandleChildCrash(pid, exitstatus, _("server process")); @@ -2958,7 +2958,7 @@ PostmasterStateMachine(void) * PM_WAIT_BACKENDS state ends when we have no regular backends * (including autovac workers) and no walwriter or autovac launcher. * If we are doing crash recovery then we expect the bgwriter to exit - * too, otherwise not. The archiver, stats, and syslogger processes + * too, otherwise not. The archiver, stats, and syslogger processes * are disregarded since they are not connected to shared memory; we * also disregard dead_end children here. Walsenders are also * disregarded, they will be terminated later after writing the @@ -2974,7 +2974,7 @@ PostmasterStateMachine(void) if (FatalError) { /* - * Start waiting for dead_end children to die. This state + * Start waiting for dead_end children to die. This state * change causes ServerLoop to stop creating new ones. */ pmState = PM_WAIT_DEAD_END; @@ -3072,7 +3072,7 @@ PostmasterStateMachine(void) /* * If we've been told to shut down, we exit as soon as there are no - * remaining children. If there was a crash, cleanup will occur at the + * remaining children. If there was a crash, cleanup will occur at the * next startup. (Before PostgreSQL 8.3, we tried to recover from the * crash before exiting, but that seems unwise if we are quitting because * we got SIGTERM from init --- there may well not be time for recovery @@ -3148,7 +3148,7 @@ PostmasterStateMachine(void) * system(). * * There is a race condition for recently-forked children: they might not - * have executed setsid() yet. So we signal the child directly as well as + * have executed setsid() yet. So we signal the child directly as well as * the group. We assume such a child will handle the signal before trying * to spawn any grandchild processes. We also assume that signaling the * child twice will not cause any problems. @@ -3336,7 +3336,7 @@ BackendStartup(Port *port) /* * Try to report backend fork() failure to client before we close the - * connection. Since we do not care to risk blocking the postmaster on + * connection. Since we do not care to risk blocking the postmaster on * this connection, we set the connection to non-blocking and try only once. * * This is grungy special-purpose code; we cannot use backend libpq since @@ -3390,7 +3390,7 @@ BackendInitialize(Port *port) /* * PreAuthDelay is a debugging aid for investigating problems in the * authentication cycle: it can be set in postgresql.conf to allow time to - * attach to the newly-forked backend with a debugger. (See also + * attach to the newly-forked backend with a debugger. (See also * PostAuthDelay, which we allow clients to pass through PGOPTIONS, but it * is not honored until after authentication.) */ @@ -3417,7 +3417,7 @@ BackendInitialize(Port *port) /* * If possible, make this process a group leader, so that the postmaster - * can signal any child processes too. (We do this now on the off chance + * can signal any child processes too. (We do this now on the off chance * that something might spawn a child process during authentication.) */ #ifdef HAVE_SETSID @@ -3427,7 +3427,7 @@ BackendInitialize(Port *port) /* * We arrange for a simple exit(1) if we receive SIGTERM or SIGQUIT or - * timeout while trying to collect the startup packet. Otherwise the + * timeout while trying to collect the startup packet. Otherwise the * postmaster cannot shutdown the database FAST or IMMED cleanly if a * buggy client fails to send the packet promptly. */ @@ -3505,7 +3505,7 @@ BackendInitialize(Port *port) status = ProcessStartupPacket(port, false); /* - * Stop here if it was bad or a cancel packet. ProcessStartupPacket + * Stop here if it was bad or a cancel packet. ProcessStartupPacket * already did any appropriate error reporting. */ if (status != STATUS_OK) @@ -4053,7 +4053,7 @@ SubPostmasterMain(int argc, char *argv[]) read_nondefault_variables(); /* - * Reload any libraries that were preloaded by the postmaster. Since we + * Reload any libraries that were preloaded by the postmaster. Since we * exec'd this process, those libraries didn't come along with us; but we * should load them into all child processes to be consistent with the * non-EXEC_BACKEND behavior. @@ -4106,7 +4106,7 @@ SubPostmasterMain(int argc, char *argv[]) * * This prevents a randomized stack base address that causes child * shared memory to be at a different address than the parent, making - * it impossible to attached to shared memory. Return the value to + * it impossible to attached to shared memory. Return the value to * '1' when finished. */ CreateSharedMemoryAndSemaphores(false, 0); @@ -4212,7 +4212,7 @@ ExitPostmaster(int status) /* should cleanup shared memory and kill all backends */ /* - * Not sure of the semantics here. When the Postmaster dies, should the + * Not sure of the semantics here. When the Postmaster dies, should the * backends all be killed? probably not. * * MUST -- vadim 05-10-1999 @@ -4244,7 +4244,7 @@ sigusr1_handler(SIGNAL_ARGS) FatalError = false; /* - * Crank up the background writer. It doesn't matter if this fails, + * Crank up the background writer. It doesn't matter if this fails, * we'll just try again later. */ Assert(BgWriterPID == 0); @@ -4467,7 +4467,7 @@ CountChildren(int target) /* * StartChildProcess -- start an auxiliary process for the postmaster * - * xlop determines what kind of child will be started. All child types + * xlop determines what kind of child will be started. All child types * initially go to AuxiliaryProcessMain, which will handle common setup. * * Return value of StartChildProcess is subprocess' PID, or 0 if failed @@ -4686,9 +4686,9 @@ CreateOptsFile(int argc, char *argv[], char *fullprogname) * This reports the number of entries needed in per-child-process arrays * (the PMChildFlags array, and if EXEC_BACKEND the ShmemBackendArray). * These arrays include regular backends, autovac workers and walsenders, - * but not special children nor dead_end children. This allows the arrays + * but not special children nor dead_end children. This allows the arrays * to have a fixed maximum size, to wit the same too-many-children limit - * enforced by canAcceptConnections(). The exact value isn't too critical + * enforced by canAcceptConnections(). The exact value isn't too critical * as long as it's more than MaxBackends. */ int |