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
929a5993
Commit
929a5993
authored
Nov 08, 2000
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add '-c name=val' flag for setting run-time parameters.
parent
33043417
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+3
-3
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+13
-6
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+11
-4
No files found.
doc/src/sgml/runtime.sgml
View file @
929a5993
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
1 2000/11/01 21:14:00
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
2 2000/11/08 17:57:45
petere Exp $
-->
<Chapter Id="runtime">
...
...
@@ -411,7 +411,7 @@ syslog = 2
A second way to set these configuration parameters is to give them
as a command line option to the postmaster, such as
<programlisting>
postmaster -
-log-connections=yes --
syslog=2
postmaster -
c log_connections=yes -c
syslog=2
</programlisting>
which would have the same effect as the previous example.
</para>
...
...
@@ -422,7 +422,7 @@ postmaster --log-connections=yes --syslog=2
<envar>PGOPTIONS</envar> can be used for this purpose on the
client side:
<programlisting>
env PGOPTIONS='-
-
geqo=off' psql
env PGOPTIONS='-
c
geqo=off' psql
</programlisting>
(This works for any client application, not just
<application>psql</application>.) Note that this won't work for
...
...
src/backend/postmaster/postmaster.c
View file @
929a5993
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
79 2000/11/06 22:18:0
6 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.1
80 2000/11/08 17:57:4
6 petere Exp $
*
* NOTES
*
...
...
@@ -372,7 +372,7 @@ PostmasterMain(int argc, char *argv[])
* will occur.
*/
opterr
=
1
;
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:D:d:Film:MN:no:p:SsV-:?"
))
!=
EOF
)
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:
c:
D:d:Film:MN:no:p:SsV-:?"
))
!=
EOF
)
{
switch
(
opt
)
{
...
...
@@ -428,7 +428,7 @@ PostmasterMain(int argc, char *argv[])
#ifdef HAVE_INT_OPTRESET
optreset
=
1
;
#endif
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:D:d:Film:MN:no:p:SsV-:?"
))
!=
EOF
)
while
((
opt
=
getopt
(
argc
,
argv
,
"A:a:B:b:
c:
D:d:Film:MN:no:p:SsV-:?"
))
!=
EOF
)
{
switch
(
opt
)
{
...
...
@@ -530,13 +530,19 @@ PostmasterMain(int argc, char *argv[])
*/
SendStop
=
true
;
break
;
case
'c'
:
case
'-'
:
{
char
*
name
,
*
value
;
ParseLongOption
(
optarg
,
&
name
,
&
value
);
if
(
!
value
)
elog
(
ERROR
,
"--%s requires argument"
,
optarg
);
{
if
(
opt
==
'-'
)
elog
(
ERROR
,
"--%s requires argument"
,
optarg
);
else
elog
(
ERROR
,
"-c %s requires argument"
,
optarg
);
}
SetConfigOption
(
name
,
value
,
PGC_POSTMASTER
);
free
(
name
);
...
...
@@ -766,6 +772,7 @@ usage(const char *progname)
printf
(
" -A 1|0 enable/disable runtime assert checking
\n
"
);
#endif
printf
(
" -B <buffers> number of shared buffers
\n
"
);
printf
(
" -c <name>=<value> set run-time parameter
\n
"
);
printf
(
" -d 1-5 debugging level
\n
"
);
printf
(
" -D <directory> database directory
\n
"
);
printf
(
" -F turn fsync off
\n
"
);
...
...
@@ -775,7 +782,7 @@ usage(const char *progname)
#endif
printf
(
" -N <number> maximum number of allowed connections (1..%d, default %d)
\n
"
,
MAXBACKENDS
,
DEF_MAXBACKENDS
);
printf
(
" -o <option> pass
`
option' to each backend server
\n
"
);
printf
(
" -o <option> pass
'
option' to each backend server
\n
"
);
printf
(
" -p <port> port number to listen on
\n
"
);
printf
(
" -S silent mode (dissociate from tty)
\n
"
);
...
...
@@ -783,7 +790,7 @@ usage(const char *progname)
printf
(
" -n don't reinitialize shared memory after abnormal exit
\n
"
);
printf
(
" -s send SIGSTOP to all backend servers if one dies
\n
"
);
printf
(
"
\n
Please read the documentation for the complete list of runtime
\n
"
printf
(
"
\n
Please read the documentation for the complete list of run
-
time
\n
"
"configuration settings and how to set them on the command line or in
\n
"
"the configuration file.
\n\n
"
);
...
...
src/backend/tcop/postgres.c
View file @
929a5993
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.18
6 2000/11/06 22:18:08
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.18
7 2000/11/08 17:57:46
petere Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -1010,6 +1010,7 @@ usage(char *progname)
fprintf
(
stderr
,
"
\t
-A on
\t\t
enable/disable assert checking
\n
"
);
#endif
fprintf
(
stderr
,
"
\t
-B buffers
\t
set number of buffers in buffer pool
\n
"
);
fprintf
(
stderr
,
"
\t
-c name=value
\t
set run-time parameter
\n
"
);
fprintf
(
stderr
,
"
\t
-C
\t\t
suppress version info
\n
"
);
fprintf
(
stderr
,
"
\t
-D dir
\t\t
data directory
\n
"
);
fprintf
(
stderr
,
"
\t
-E
\t\t
echo query before execution
\n
"
);
...
...
@@ -1112,7 +1113,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
optind
=
1
;
/* reset after postmaster's usage */
while
((
flag
=
getopt
(
argc
,
argv
,
"A:B:CD:d:Eef:FiLNOPo:p:S:st:v:VW:x:-:?"
))
!=
EOF
)
while
((
flag
=
getopt
(
argc
,
argv
,
"A:B:
c:
CD:d:Eef:FiLNOPo:p:S:st:v:VW:x:-:?"
))
!=
EOF
)
switch
(
flag
)
{
case
'A'
:
...
...
@@ -1383,6 +1384,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
#endif
break
;
case
'c'
:
case
'-'
:
{
char
*
name
,
*
value
;
...
...
@@ -1399,7 +1401,12 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
exit
(
0
);
}
if
(
!
value
)
elog
(
ERROR
,
"--%s requires argument"
,
optarg
);
{
if
(
flag
==
'-'
)
elog
(
ERROR
,
"--%s requires argument"
,
optarg
);
else
elog
(
ERROR
,
"-c %s requires argument"
,
optarg
);
}
SetConfigOption
(
name
,
value
,
PGC_BACKEND
);
free
(
name
);
...
...
@@ -1639,7 +1646,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.18
6 $ $Date: 2000/11/06 22:18:08
$
\n
"
);
puts
(
"$Revision: 1.18
7 $ $Date: 2000/11/08 17:57:46
$
\n
"
);
}
/*
...
...
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