diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index aa07c12279c0386b6f8143731e2c51b426550e64..7dca3d567e581bc9aa7a6fef043254ab06a498f9 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -7,7 +7,7 @@ * * * 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) pqdebug("%s", PQerrormsg); strcat(PQerrormsg, "\tIs another postmaster already running on that port?\n"); 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 strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n"); fputs(PQerrormsg, stderr); diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 6f1c28b50abba7a2d86a9a3b12562cab3d86b2b5..59b3007bd5361c5843fd35e661e4f2b63a62b229 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -10,7 +10,7 @@ * * * 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 * @@ -186,10 +186,10 @@ static char ExtraOptions[ARGV_SIZE] = ""; * the postmaster stop (rather than kill) peers and not reinitialize * shared data structures. */ -static int Reinit = 1; -static int SendStop = 0; +static bool Reinit = true; +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 */ /* @@ -360,7 +360,7 @@ PostmasterMain(int argc, char *argv[]) DebugLvl = 1; break; case 'i': - NetServer = 1; + NetServer = true; break; case 'm': /* Multiplexed backends no longer supported. */ @@ -375,7 +375,7 @@ PostmasterMain(int argc, char *argv[]) break; case 'n': /* Don't reinit shared mem after abnormal exit */ - Reinit = 0; + Reinit = false; break; case 'o': @@ -408,7 +408,7 @@ PostmasterMain(int argc, char *argv[]) * lets the wily post_hacker collect core dumps from * everyone. */ - SendStop = 1; + SendStop = true; break; default: /* usage() never returns */ @@ -508,17 +508,18 @@ pmdaemonize(void) static void 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-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-d [1|2|3]\tset debugging level\n"); - fprintf(stderr, "\t-D datadir\tset data directory\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-i \t\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-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-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-p port\tspecify port for postmaster to listen on\n"); + fprintf(stderr, "\t-s \t\tsend SIGSTOP to all backend servers if one dies\n"); exit(1); } diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 1e254c84648b92bca53bc760e891df5d9c10681b..c8cad2444c7e10dcdf27e615086e4cc17e567db7 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -7,7 +7,7 @@ * * * 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 * this is the "main" module of the postgres backend and @@ -803,34 +803,23 @@ static void usage(char *progname) { fprintf(stderr, - "Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-v protocol] [\t -o filename]\n", - progname); - fprintf(stderr, "\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n"); - fprintf(stderr, " b: consider bushy plan trees during optimization\n"); - fprintf(stderr, " B: set number of buffers in buffer pool\n"); - fprintf(stderr, " C: supress version info\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"); + "Usage: %s [options] [dbname]\n", progname); + fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n"); + fprintf(stderr, "\t-C \t\tsupress version info\n"); + fprintf(stderr, "\t-D dir\t\tdata directory\n"); + fprintf(stderr, "\t-E \t\techo query before execution\n"); + fprintf(stderr, "\t-F \t\tturn off fsync\n"); #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 - fprintf(stderr, " L: turn off locking\n"); - fprintf(stderr, " M: start as postmaster\n"); - fprintf(stderr, " N: don't use newline as query delimiter\n"); - fprintf(stderr, " o: send stdout and stderr to given filename \n"); - fprintf(stderr, " p: backend started by postmaster\n"); - fprintf(stderr, " P: set port file descriptor\n"); - fprintf(stderr, " Q: suppress informational messages\n"); - fprintf(stderr, " S: set amount of sort memory available\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"); + fprintf(stderr, "\t-P port\t\tset port file descriptor\n"); + fprintf(stderr, "\t-Q \t\tsuppress informational messages\n"); + fprintf(stderr, "\t-S buffers\tset amount of sort memory available\n"); + fprintf(stderr, "\t-d [1|2|3]\tset debug level\n"); + fprintf(stderr, "\t-e \t\tturn on European date format\n"); + fprintf(stderr, "\t-o file\t\tsend stdout and stderr to given filename \n"); + fprintf(stderr, "\t-s \t\tshow stats after each query\n"); + fprintf(stderr, "\t-v version\tset protocol version being used by frontend\n"); } /* ---------------------------------------------------------------- @@ -1328,7 +1317,7 @@ PostgresMain(int argc, char *argv[]) if (IsUnderPostmaster == false) { 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 $"); } /* ---------------- diff --git a/src/man/postgres.1 b/src/man/postgres.1 index 24d1bf4c46b93e5443af6c45c29217a31933eb01..68b9adcefbf7e02bb841bd37c9c601bee77c05cb 100644 --- a/src/man/postgres.1 +++ b/src/man/postgres.1 @@ -1,6 +1,6 @@ .\" This is -*-nroff-*- .\" 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 .SH NAME postgres - the Postgres backend server @@ -10,6 +10,9 @@ postgres - the Postgres backend server .BR "-B" n_buffers] [\c +.BR "-C" +] +[\c .BR "-D" data_directory] [\c @@ -18,7 +21,6 @@ data_directory] [\c .BR "-F" ] -.br [\c .BR "-P" filedes] @@ -29,21 +31,20 @@ filedes] .BR "-S n_buffers" ] [\c -.BR "-e" -] -[\c -.BR "-v protocol" -] -.br -[\c .BR "-d" debug_level] [\c +.BR "-e" +] +[\c .BR "-o" output_file] [\c .BR "-s" ] +[\c +.BR "-v protocol" +] [dbname] .in -5n .SH DESCRIPTION @@ -64,7 +65,20 @@ environment variable. The .IR postgres 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" This option specifies the pathname of the directory that contains the database system data (the tables, the catalogs, etc.). If you don't @@ -77,16 +91,6 @@ the database system is created with with a --pgdata option to .IR initdb . .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" Echo all queries. .TP @@ -152,7 +156,7 @@ buffers. .BR "-v" " protocol" Specifies the number of the frontend/backend protocol to be used for this particular session. -.SH "DEPRECATED COMMAND OPTIONS" +.SH "DEVELOPER COMMAND OPTIONS" There are several other options that may be specified, used mainly for debugging purposes. These are listed here only for the use by Postgres system developers. @@ -184,6 +188,9 @@ disable nested-loop, merge and hash joins respectively. This is another feature that may not necessarily produce executable plans. .TP +.BR "-i" +Prevents query execution, but shows the plan tree. +.TP .BR "-p" Indicates to the backend server that it has been started by a .IR postmaster