Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3af1cc67
Commit
3af1cc67
authored
May 27, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postmaster/postgres options cleanup.
parent
b1eb7b59
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
65 deletions
+62
-65
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+2
-2
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+15
-14
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+17
-28
src/man/postgres.1
src/man/postgres.1
+28
-21
No files found.
src/backend/libpq/pqcomm.c
View file @
3af1cc67
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.4
1 1998/05/19 18:05:46
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.4
2 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
,
"
\t
Is another postmaster already running on that port?
\n
"
);
strcat
(
PQerrormsg
,
"
\t
Is another postmaster already running on that port?
\n
"
);
if
(
family
==
AF_UNIX
)
if
(
family
==
AF_UNIX
)
strcat
(
PQerrormsg
,
"
\t
If not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.
\n
"
);
strcat
(
PQerrormsg
,
"
\t
If not, remove socket node (/tmp/.s.PGSQL.<portn
umbe
r>)and retry.
\n
"
);
else
else
strcat
(
PQerrormsg
,
"
\t
If not, wait a few seconds and retry.
\n
"
);
strcat
(
PQerrormsg
,
"
\t
If not, wait a few seconds and retry.
\n
"
);
fputs
(
PQerrormsg
,
stderr
);
fputs
(
PQerrormsg
,
stderr
);
...
...
src/backend/postmaster/postmaster.c
View file @
3af1cc67
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.7
6 1998/03/30 16:47:11
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.7
7 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
\t
set number of shared buffers
\n
"
);
fprintf
(
stderr
,
"
\t
-B nbufs
\t
set number of shared buffers
\n
"
);
fprintf
(
stderr
,
"
\t
-D datadir
\t
set data directory
\n
"
);
fprintf
(
stderr
,
"
\t
-S
\t\t
silent mode (disassociate from tty)
\n
"
);
fprintf
(
stderr
,
"
\t
-a system
\t
use this authentication system
\n
"
);
fprintf
(
stderr
,
"
\t
-b backend
\t
use a specific backend server executable
\n
"
);
fprintf
(
stderr
,
"
\t
-b backend
\t
use a specific backend server executable
\n
"
);
fprintf
(
stderr
,
"
\t
-d [1|2|3]
\t
set debugging level
\n
"
);
fprintf
(
stderr
,
"
\t
-d [1|2|3]
\t
set debugging level
\n
"
);
fprintf
(
stderr
,
"
\t
-D datadir
\t
set data directory
\n
"
);
fprintf
(
stderr
,
"
\t
-i
\t\t
listen on TCP/IP sockets as well as Unix domain socket
\n
"
);
fprintf
(
stderr
,
"
\t
-i
\t
listen on TCP/IP sockets as well as Unix domain socket
\n
"
);
fprintf
(
stderr
,
"
\t
-n
\t\t
don't reinitialize shared memory after abnormal exit
\n
"
);
fprintf
(
stderr
,
"
\t
-n
\t\t
don't reinitialize shared memory after abnormal exit
\n
"
);
fprintf
(
stderr
,
"
\t
-o option
\t
pass 'option' to each backend servers
\n
"
);
fprintf
(
stderr
,
"
\t
-o option
\t
pass 'option' to each backend servers
\n
"
);
fprintf
(
stderr
,
"
\t
-p port
\t\t
specify port for postmaster to listen on
\n
"
);
fprintf
(
stderr
,
"
\t
-p port
\t
specify port for postmaster to listen on
\n
"
);
fprintf
(
stderr
,
"
\t
-S
\t\t
silent mode (disassociate from tty)
\n
"
);
fprintf
(
stderr
,
"
\t
-s
\t\t
send SIGSTOP to all backend servers if one dies
\n
"
);
fprintf
(
stderr
,
"
\t
-s
\t\t
send SIGSTOP to all backend servers if one dies
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
...
...
src/backend/tcop/postgres.c
View file @
3af1cc67
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.7
0 1998/05/26 03:20:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.7
1 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
\t
set number of buffers in buffer pool
\n
"
);
fprintf
(
stderr
,
"
\t
[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]
\n
"
);
fprintf
(
stderr
,
"
\t
-C
\t\t
supress version info
\n
"
);
fprintf
(
stderr
,
" b: consider bushy plan trees during optimization
\n
"
);
fprintf
(
stderr
,
"
\t
-D dir
\t\t
data directory
\n
"
);
fprintf
(
stderr
,
" B: set number of buffers in buffer pool
\n
"
);
fprintf
(
stderr
,
"
\t
-E
\t\t
echo query before execution
\n
"
);
fprintf
(
stderr
,
" C: supress version info
\n
"
);
fprintf
(
stderr
,
"
\t
-F
\t\t
turn 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\t
set locking debug level [0|1|2]
\n
"
);
#endif
#endif
fprintf
(
stderr
,
" L: turn off locking
\n
"
);
fprintf
(
stderr
,
"
\t
-P port
\t\t
set port file descriptor
\n
"
);
fprintf
(
stderr
,
" M: start as postmaster
\n
"
);
fprintf
(
stderr
,
"
\t
-Q
\t\t
suppress informational messages
\n
"
);
fprintf
(
stderr
,
" N: don't use newline as query delimiter
\n
"
);
fprintf
(
stderr
,
"
\t
-S buffers
\t
set amount of sort memory available
\n
"
);
fprintf
(
stderr
,
" o: send stdout and stderr to given filename
\n
"
);
fprintf
(
stderr
,
"
\t
-d [1|2|3]
\t
set debug level
\n
"
);
fprintf
(
stderr
,
" p: backend started by postmaster
\n
"
);
fprintf
(
stderr
,
"
\t
-e
\t\t
turn on European date format
\n
"
);
fprintf
(
stderr
,
" P: set port file descriptor
\n
"
);
fprintf
(
stderr
,
"
\t
-o file
\t\t
send stdout and stderr to given filename
\n
"
);
fprintf
(
stderr
,
" Q: suppress informational messages
\n
"
);
fprintf
(
stderr
,
"
\t
-s
\t\t
show stats after each query
\n
"
);
fprintf
(
stderr
,
" S: set amount of sort memory available
\n
"
);
fprintf
(
stderr
,
"
\t
-v version
\t
set 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
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.7
0 $ $Date: 1998/05/26 03:20:00
$"
);
puts
(
"$Revision: 1.7
1 $ $Date: 1998/05/27 18:32:03
$"
);
}
}
/* ----------------
/* ----------------
...
...
src/man/postgres.1
View file @
3af1cc67
.\" 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.1
0 1998/01/26 01:42:51 scrappy
Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/postgres.1,v 1.1
1 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 "DE
PRECATED
COMMAND OPTIONS"
.SH "DE
VELOPER
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment