Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 3af1cc6

Browse files
committed
postmaster/postgres options cleanup.
1 parent b1eb7b5 commit 3af1cc6

File tree

4 files changed

+62
-65
lines changed

4 files changed

+62
-65
lines changed

src/backend/libpq/pqcomm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.41 1998/05/19 18:05:46 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.42 1998/05/27 18:32:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -621,7 +621,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
621621
pqdebug("%s", PQerrormsg);
622622
strcat(PQerrormsg, "\tIs another postmaster already running on that port?\n");
623623
if (family == AF_UNIX)
624-
strcat(PQerrormsg, "\tIf not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.\n");
624+
strcat(PQerrormsg, "\tIf not, remove socket node (/tmp/.s.PGSQL.<portnumber>)and retry.\n");
625625
else
626626
strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n");
627627
fputs(PQerrormsg, stderr);

src/backend/postmaster/postmaster.c

+15-14
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.76 1998/03/30 16:47:11 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.77 1998/05/27 18:32:02 momjian Exp $
1414
*
1515
* NOTES
1616
*
@@ -186,10 +186,10 @@ static char ExtraOptions[ARGV_SIZE] = "";
186186
* the postmaster stop (rather than kill) peers and not reinitialize
187187
* shared data structures.
188188
*/
189-
static int Reinit = 1;
190-
static int SendStop = 0;
189+
static bool Reinit = true;
190+
static int SendStop = false;
191191

192-
static int NetServer = 0; /* if not zero, postmaster listen for
192+
static bool NetServer = false; /* if not zero, postmaster listen for
193193
* non-local connections */
194194

195195
/*
@@ -360,7 +360,7 @@ PostmasterMain(int argc, char *argv[])
360360
DebugLvl = 1;
361361
break;
362362
case 'i':
363-
NetServer = 1;
363+
NetServer = true;
364364
break;
365365
case 'm':
366366
/* Multiplexed backends no longer supported. */
@@ -375,7 +375,7 @@ PostmasterMain(int argc, char *argv[])
375375
break;
376376
case 'n':
377377
/* Don't reinit shared mem after abnormal exit */
378-
Reinit = 0;
378+
Reinit = false;
379379
break;
380380
case 'o':
381381

@@ -408,7 +408,7 @@ PostmasterMain(int argc, char *argv[])
408408
* lets the wily post_hacker collect core dumps from
409409
* everyone.
410410
*/
411-
SendStop = 1;
411+
SendStop = true;
412412
break;
413413
default:
414414
/* usage() never returns */
@@ -508,17 +508,18 @@ pmdaemonize(void)
508508
static void
509509
usage(const char *progname)
510510
{
511-
fprintf(stderr, "usage: %s [options..]\n", progname);
511+
fprintf(stderr, "usage: %s [options]\n", progname);
512512
fprintf(stderr, "\t-B nbufs\tset number of shared buffers\n");
513+
fprintf(stderr, "\t-D datadir\tset data directory\n");
514+
fprintf(stderr, "\t-S \t\tsilent mode (disassociate from tty)\n");
515+
fprintf(stderr, "\t-a system\tuse this authentication system\n");
513516
fprintf(stderr, "\t-b backend\tuse a specific backend server executable\n");
514517
fprintf(stderr, "\t-d [1|2|3]\tset debugging level\n");
515-
fprintf(stderr, "\t-D datadir\tset data directory\n");
516-
fprintf(stderr, "\t-i \tlisten on TCP/IP sockets as well as Unix domain socket\n");
517-
fprintf(stderr, "\t-n\t\tdon't reinitialize shared memory after abnormal exit\n");
518+
fprintf(stderr, "\t-i \t\tlisten on TCP/IP sockets as well as Unix domain socket\n");
519+
fprintf(stderr, "\t-n \t\tdon't reinitialize shared memory after abnormal exit\n");
518520
fprintf(stderr, "\t-o option\tpass 'option' to each backend servers\n");
519-
fprintf(stderr, "\t-p port\t\tspecify port for postmaster to listen on\n");
520-
fprintf(stderr, "\t-S\t\tsilent mode (disassociate from tty)\n");
521-
fprintf(stderr, "\t-s\t\tsend SIGSTOP to all backend servers if one dies\n");
521+
fprintf(stderr, "\t-p port\tspecify port for postmaster to listen on\n");
522+
fprintf(stderr, "\t-s \t\tsend SIGSTOP to all backend servers if one dies\n");
522523
exit(1);
523524
}
524525

src/backend/tcop/postgres.c

+17-28
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.70 1998/05/26 03:20:00 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.71 1998/05/27 18:32:03 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -803,34 +803,23 @@ static void
803803
usage(char *progname)
804804
{
805805
fprintf(stderr,
806-
"Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-v protocol] [\t -o filename]\n",
807-
progname);
808-
fprintf(stderr, "\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
809-
fprintf(stderr, " b: consider bushy plan trees during optimization\n");
810-
fprintf(stderr, " B: set number of buffers in buffer pool\n");
811-
fprintf(stderr, " C: supress version info\n");
812-
fprintf(stderr, " d: set debug level\n");
813-
fprintf(stderr, " E: echo query before execution\n");
814-
fprintf(stderr, " e turn on European date format\n");
815-
fprintf(stderr, " F: turn off fsync\n");
816-
fprintf(stderr, " f: forbid plantype generation\n");
817-
fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
806+
"Usage: %s [options] [dbname]\n", progname);
807+
fprintf(stderr, "\t-B buffers\tset number of buffers in buffer pool\n");
808+
fprintf(stderr, "\t-C \t\tsupress version info\n");
809+
fprintf(stderr, "\t-D dir\t\tdata directory\n");
810+
fprintf(stderr, "\t-E \t\techo query before execution\n");
811+
fprintf(stderr, "\t-F \t\tturn off fsync\n");
818812
#ifdef LOCK_MGR_DEBUG
819-
fprintf(stderr, " K: set locking debug level [0|1|2]\n");
813+
fprintf(stderr, "\t-K \t\tset locking debug level [0|1|2]\n");
820814
#endif
821-
fprintf(stderr, " L: turn off locking\n");
822-
fprintf(stderr, " M: start as postmaster\n");
823-
fprintf(stderr, " N: don't use newline as query delimiter\n");
824-
fprintf(stderr, " o: send stdout and stderr to given filename \n");
825-
fprintf(stderr, " p: backend started by postmaster\n");
826-
fprintf(stderr, " P: set port file descriptor\n");
827-
fprintf(stderr, " Q: suppress informational messages\n");
828-
fprintf(stderr, " S: set amount of sort memory available\n");
829-
fprintf(stderr, " s: show stats after each query\n");
830-
fprintf(stderr, " t: trace component execution times\n");
831-
fprintf(stderr, " T: execute all possible plans for each query\n");
832-
fprintf(stderr, " v: set protocol version being used by frontend\n");
833-
fprintf(stderr, " x: control expensive function optimization\n");
815+
fprintf(stderr, "\t-P port\t\tset port file descriptor\n");
816+
fprintf(stderr, "\t-Q \t\tsuppress informational messages\n");
817+
fprintf(stderr, "\t-S buffers\tset amount of sort memory available\n");
818+
fprintf(stderr, "\t-d [1|2|3]\tset debug level\n");
819+
fprintf(stderr, "\t-e \t\tturn on European date format\n");
820+
fprintf(stderr, "\t-o file\t\tsend stdout and stderr to given filename \n");
821+
fprintf(stderr, "\t-s \t\tshow stats after each query\n");
822+
fprintf(stderr, "\t-v version\tset protocol version being used by frontend\n");
834823
}
835824

836825
/* ----------------------------------------------------------------
@@ -1328,7 +1317,7 @@ PostgresMain(int argc, char *argv[])
13281317
if (IsUnderPostmaster == false)
13291318
{
13301319
puts("\nPOSTGRES backend interactive interface");
1331-
puts("$Revision: 1.70 $ $Date: 1998/05/26 03:20:00 $");
1320+
puts("$Revision: 1.71 $ $Date: 1998/05/27 18:32:03 $");
13321321
}
13331322

13341323
/* ----------------

src/man/postgres.1

+28-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.10 1998/01/26 01:42:51 scrappy Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.11 1998/05/27 18:32:05 momjian Exp $
44
.TH POSTGRESQL UNIX 12/08/96 PostgreSQL PostgreSQL
55
.SH NAME
66
postgres - the Postgres backend server
@@ -10,6 +10,9 @@ postgres - the Postgres backend server
1010
.BR "-B"
1111
n_buffers]
1212
[\c
13+
.BR "-C"
14+
]
15+
[\c
1316
.BR "-D"
1417
data_directory]
1518
[\c
@@ -18,7 +21,6 @@ data_directory]
1821
[\c
1922
.BR "-F"
2023
]
21-
.br
2224
[\c
2325
.BR "-P"
2426
filedes]
@@ -29,21 +31,20 @@ filedes]
2931
.BR "-S n_buffers"
3032
]
3133
[\c
32-
.BR "-e"
33-
]
34-
[\c
35-
.BR "-v protocol"
36-
]
37-
.br
38-
[\c
3934
.BR "-d"
4035
debug_level]
4136
[\c
37+
.BR "-e"
38+
]
39+
[\c
4240
.BR "-o"
4341
output_file]
4442
[\c
4543
.BR "-s"
4644
]
45+
[\c
46+
.BR "-v protocol"
47+
]
4748
[dbname]
4849
.in -5n
4950
.SH DESCRIPTION
@@ -64,7 +65,20 @@ environment variable.
6465
The
6566
.IR postgres
6667
server understands the following command-line options:
67-
.TP 5n
68+
.TP
69+
.BR "-B" " n_buffers"
70+
If the backend is running under the
71+
.IR postmaster ,
72+
.IR "n_buffers"
73+
is the number of shared-memory buffers that the
74+
.IR "postmaster"
75+
has allocated for the backend server processes that it starts. If the
76+
backend is running standalone, this specifies the number of buffers to
77+
allocate. This value defaults to 64, and each buffer is 8k bytes.
78+
.TP
79+
.BR "-C"
80+
Do not show server version number.
81+
.TP
6882
.BR "-D" " data_directory"
6983
This option specifies the pathname of the directory that contains the
7084
database system data (the tables, the catalogs, etc.). If you don't
@@ -77,16 +91,6 @@ the database system is created with
7791
with a --pgdata option to
7892
.IR initdb .
7993
.TP
80-
.BR "-B" " n_buffers"
81-
If the backend is running under the
82-
.IR postmaster ,
83-
.IR "n_buffers"
84-
is the number of shared-memory buffers that the
85-
.IR "postmaster"
86-
has allocated for the backend server processes that it starts. If the
87-
backend is running standalone, this specifies the number of buffers to
88-
allocate. This value defaults to 64, and each buffer is 8k bytes.
89-
.TP
9094
.BR "-E"
9195
Echo all queries.
9296
.TP
@@ -152,7 +156,7 @@ buffers.
152156
.BR "-v" " protocol"
153157
Specifies the number of the frontend/backend protocol to be used for this
154158
particular session.
155-
.SH "DEPRECATED COMMAND OPTIONS"
159+
.SH "DEVELOPER COMMAND OPTIONS"
156160
There are several other options that may be specified, used mainly
157161
for debugging purposes. These are listed here only for the use by
158162
Postgres system developers.
@@ -184,6 +188,9 @@ disable nested-loop, merge and hash joins respectively.
184188
This is another feature that may not necessarily produce executable
185189
plans.
186190
.TP
191+
.BR "-i"
192+
Prevents query execution, but shows the plan tree.
193+
.TP
187194
.BR "-p"
188195
Indicates to the backend server that it has been started by a
189196
.IR postmaster

0 commit comments

Comments
 (0)