Commit 3af1cc67 authored by Bruce Momjian's avatar Bruce Momjian

postmaster/postgres options cleanup.

parent b1eb7b59
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.41 1998/05/19 18:05:46 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.42 1998/05/27 18:32:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -621,7 +621,7 @@ StreamServerPort(char *hostName, short portName, int *fdP) ...@@ -621,7 +621,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
pqdebug("%s", PQerrormsg); pqdebug("%s", PQerrormsg);
strcat(PQerrormsg, "\tIs another postmaster already running on that port?\n"); strcat(PQerrormsg, "\tIs another postmaster already running on that port?\n");
if (family == AF_UNIX) if (family == AF_UNIX)
strcat(PQerrormsg, "\tIf not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.\n"); strcat(PQerrormsg, "\tIf not, remove socket node (/tmp/.s.PGSQL.<portnumber>)and retry.\n");
else else
strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n"); strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n");
fputs(PQerrormsg, stderr); fputs(PQerrormsg, stderr);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.76 1998/03/30 16:47:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.77 1998/05/27 18:32:02 momjian Exp $
* *
* NOTES * NOTES
* *
...@@ -186,10 +186,10 @@ static char ExtraOptions[ARGV_SIZE] = ""; ...@@ -186,10 +186,10 @@ static char ExtraOptions[ARGV_SIZE] = "";
* the postmaster stop (rather than kill) peers and not reinitialize * the postmaster stop (rather than kill) peers and not reinitialize
* shared data structures. * shared data structures.
*/ */
static int Reinit = 1; static bool Reinit = true;
static int SendStop = 0; static int SendStop = false;
static int NetServer = 0; /* if not zero, postmaster listen for static bool NetServer = false; /* if not zero, postmaster listen for
* non-local connections */ * non-local connections */
/* /*
...@@ -360,7 +360,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -360,7 +360,7 @@ PostmasterMain(int argc, char *argv[])
DebugLvl = 1; DebugLvl = 1;
break; break;
case 'i': case 'i':
NetServer = 1; NetServer = true;
break; break;
case 'm': case 'm':
/* Multiplexed backends no longer supported. */ /* Multiplexed backends no longer supported. */
...@@ -375,7 +375,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -375,7 +375,7 @@ PostmasterMain(int argc, char *argv[])
break; break;
case 'n': case 'n':
/* Don't reinit shared mem after abnormal exit */ /* Don't reinit shared mem after abnormal exit */
Reinit = 0; Reinit = false;
break; break;
case 'o': case 'o':
...@@ -408,7 +408,7 @@ PostmasterMain(int argc, char *argv[]) ...@@ -408,7 +408,7 @@ PostmasterMain(int argc, char *argv[])
* lets the wily post_hacker collect core dumps from * lets the wily post_hacker collect core dumps from
* everyone. * everyone.
*/ */
SendStop = 1; SendStop = true;
break; break;
default: default:
/* usage() never returns */ /* usage() never returns */
...@@ -508,17 +508,18 @@ pmdaemonize(void) ...@@ -508,17 +508,18 @@ pmdaemonize(void)
static void static void
usage(const char *progname) usage(const char *progname)
{ {
fprintf(stderr, "usage: %s [options..]\n", progname); fprintf(stderr, "usage: %s [options]\n", progname);
fprintf(stderr, "\t-B nbufs\tset number of shared buffers\n"); fprintf(stderr, "\t-B nbufs\tset number of shared buffers\n");
fprintf(stderr, "\t-D datadir\tset data directory\n");
fprintf(stderr, "\t-S \t\tsilent mode (disassociate from tty)\n");
fprintf(stderr, "\t-a system\tuse this authentication system\n");
fprintf(stderr, "\t-b backend\tuse a specific backend server executable\n"); fprintf(stderr, "\t-b backend\tuse a specific backend server executable\n");
fprintf(stderr, "\t-d [1|2|3]\tset debugging level\n"); fprintf(stderr, "\t-d [1|2|3]\tset debugging level\n");
fprintf(stderr, "\t-D datadir\tset data directory\n"); fprintf(stderr, "\t-i \t\tlisten on TCP/IP sockets as well as Unix domain socket\n");
fprintf(stderr, "\t-i \tlisten on TCP/IP sockets as well as Unix domain socket\n"); fprintf(stderr, "\t-n \t\tdon't reinitialize shared memory after abnormal exit\n");
fprintf(stderr, "\t-n\t\tdon't reinitialize shared memory after abnormal exit\n");
fprintf(stderr, "\t-o option\tpass 'option' to each backend servers\n"); fprintf(stderr, "\t-o option\tpass 'option' to each backend servers\n");
fprintf(stderr, "\t-p port\t\tspecify port for postmaster to listen on\n"); fprintf(stderr, "\t-p port\tspecify port for postmaster to listen on\n");
fprintf(stderr, "\t-S\t\tsilent mode (disassociate from tty)\n"); fprintf(stderr, "\t-s \t\tsend SIGSTOP to all backend servers if one dies\n");
fprintf(stderr, "\t-s\t\tsend SIGSTOP to all backend servers if one dies\n");
exit(1); exit(1);
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.70 1998/05/26 03:20:00 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.71 1998/05/27 18:32:03 momjian Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
...@@ -803,34 +803,23 @@ static void ...@@ -803,34 +803,23 @@ static void
usage(char *progname) usage(char *progname)
{ {
fprintf(stderr, fprintf(stderr,
"Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-v protocol] [\t -o filename]\n", "Usage: %s [options] [dbname]\n", progname);
progname); fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n");
fprintf(stderr, "\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n"); fprintf(stderr, "\t-C \t\tsupress version info\n");
fprintf(stderr, " b: consider bushy plan trees during optimization\n"); fprintf(stderr, "\t-D dir\t\tdata directory\n");
fprintf(stderr, " B: set number of buffers in buffer pool\n"); fprintf(stderr, "\t-E \t\techo query before execution\n");
fprintf(stderr, " C: supress version info\n"); fprintf(stderr, "\t-F \t\tturn off fsync\n");
fprintf(stderr, " d: set debug level\n");
fprintf(stderr, " E: echo query before execution\n");
fprintf(stderr, " e turn on European date format\n");
fprintf(stderr, " F: turn off fsync\n");
fprintf(stderr, " f: forbid plantype generation\n");
fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
#ifdef LOCK_MGR_DEBUG #ifdef LOCK_MGR_DEBUG
fprintf(stderr, " K: set locking debug level [0|1|2]\n"); fprintf(stderr, "\t-K \t\tset locking debug level [0|1|2]\n");
#endif #endif
fprintf(stderr, " L: turn off locking\n"); fprintf(stderr, "\t-P port\t\tset port file descriptor\n");
fprintf(stderr, " M: start as postmaster\n"); fprintf(stderr, "\t-Q \t\tsuppress informational messages\n");
fprintf(stderr, " N: don't use newline as query delimiter\n"); fprintf(stderr, "\t-S buffers\tset amount of sort memory available\n");
fprintf(stderr, " o: send stdout and stderr to given filename \n"); fprintf(stderr, "\t-d [1|2|3]\tset debug level\n");
fprintf(stderr, " p: backend started by postmaster\n"); fprintf(stderr, "\t-e \t\tturn on European date format\n");
fprintf(stderr, " P: set port file descriptor\n"); fprintf(stderr, "\t-o file\t\tsend stdout and stderr to given filename \n");
fprintf(stderr, " Q: suppress informational messages\n"); fprintf(stderr, "\t-s \t\tshow stats after each query\n");
fprintf(stderr, " S: set amount of sort memory available\n"); fprintf(stderr, "\t-v version\tset protocol version being used by frontend\n");
fprintf(stderr, " s: show stats after each query\n");
fprintf(stderr, " t: trace component execution times\n");
fprintf(stderr, " T: execute all possible plans for each query\n");
fprintf(stderr, " v: set protocol version being used by frontend\n");
fprintf(stderr, " x: control expensive function optimization\n");
} }
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
...@@ -1328,7 +1317,7 @@ PostgresMain(int argc, char *argv[]) ...@@ -1328,7 +1317,7 @@ PostgresMain(int argc, char *argv[])
if (IsUnderPostmaster == false) if (IsUnderPostmaster == false)
{ {
puts("\nPOSTGRES backend interactive interface"); puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.70 $ $Date: 1998/05/26 03:20:00 $"); puts("$Revision: 1.71 $ $Date: 1998/05/27 18:32:03 $");
} }
/* ---------------- /* ----------------
......
.\" This is -*-nroff-*- .\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here.... .\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.10 1998/01/26 01:42:51 scrappy Exp $ .\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.11 1998/05/27 18:32:05 momjian Exp $
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL .TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
.SH NAME .SH NAME
postgres - the Postgres backend server postgres - the Postgres backend server
...@@ -10,6 +10,9 @@ postgres - the Postgres backend server ...@@ -10,6 +10,9 @@ postgres - the Postgres backend server
.BR "-B" .BR "-B"
n_buffers] n_buffers]
[\c [\c
.BR "-C"
]
[\c
.BR "-D" .BR "-D"
data_directory] data_directory]
[\c [\c
...@@ -18,7 +21,6 @@ data_directory] ...@@ -18,7 +21,6 @@ data_directory]
[\c [\c
.BR "-F" .BR "-F"
] ]
.br
[\c [\c
.BR "-P" .BR "-P"
filedes] filedes]
...@@ -29,21 +31,20 @@ filedes] ...@@ -29,21 +31,20 @@ filedes]
.BR "-S n_buffers" .BR "-S n_buffers"
] ]
[\c [\c
.BR "-e"
]
[\c
.BR "-v protocol"
]
.br
[\c
.BR "-d" .BR "-d"
debug_level] debug_level]
[\c [\c
.BR "-e"
]
[\c
.BR "-o" .BR "-o"
output_file] output_file]
[\c [\c
.BR "-s" .BR "-s"
] ]
[\c
.BR "-v protocol"
]
[dbname] [dbname]
.in -5n .in -5n
.SH DESCRIPTION .SH DESCRIPTION
...@@ -64,7 +65,20 @@ environment variable. ...@@ -64,7 +65,20 @@ environment variable.
The The
.IR postgres .IR postgres
server understands the following command-line options: server understands the following command-line options:
.TP 5n .TP
.BR "-B" " n_buffers"
If the backend is running under the
.IR postmaster ,
.IR "n_buffers"
is the number of shared-memory buffers that the
.IR "postmaster"
has allocated for the backend server processes that it starts. If the
backend is running standalone, this specifies the number of buffers to
allocate. This value defaults to 64, and each buffer is 8k bytes.
.TP
.BR "-C"
Do not show server version number.
.TP
.BR "-D" " data_directory" .BR "-D" " data_directory"
This option specifies the pathname of the directory that contains the This option specifies the pathname of the directory that contains the
database system data (the tables, the catalogs, etc.). If you don't database system data (the tables, the catalogs, etc.). If you don't
...@@ -77,16 +91,6 @@ the database system is created with ...@@ -77,16 +91,6 @@ the database system is created with
with a --pgdata option to with a --pgdata option to
.IR initdb . .IR initdb .
.TP .TP
.BR "-B" " n_buffers"
If the backend is running under the
.IR postmaster ,
.IR "n_buffers"
is the number of shared-memory buffers that the
.IR "postmaster"
has allocated for the backend server processes that it starts. If the
backend is running standalone, this specifies the number of buffers to
allocate. This value defaults to 64, and each buffer is 8k bytes.
.TP
.BR "-E" .BR "-E"
Echo all queries. Echo all queries.
.TP .TP
...@@ -152,7 +156,7 @@ buffers. ...@@ -152,7 +156,7 @@ buffers.
.BR "-v" " protocol" .BR "-v" " protocol"
Specifies the number of the frontend/backend protocol to be used for this Specifies the number of the frontend/backend protocol to be used for this
particular session. particular session.
.SH "DEPRECATED COMMAND OPTIONS" .SH "DEVELOPER COMMAND OPTIONS"
There are several other options that may be specified, used mainly There are several other options that may be specified, used mainly
for debugging purposes. These are listed here only for the use by for debugging purposes. These are listed here only for the use by
Postgres system developers. Postgres system developers.
...@@ -184,6 +188,9 @@ disable nested-loop, merge and hash joins respectively. ...@@ -184,6 +188,9 @@ disable nested-loop, merge and hash joins respectively.
This is another feature that may not necessarily produce executable This is another feature that may not necessarily produce executable
plans. plans.
.TP .TP
.BR "-i"
Prevents query execution, but shows the plan tree.
.TP
.BR "-p" .BR "-p"
Indicates to the backend server that it has been started by a Indicates to the backend server that it has been started by a
.IR postmaster .IR postmaster
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment