Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
196700c3
Commit
196700c3
authored
23 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Add 'reload' option to pg_ctl to send SIGHUP to the postmaster.
parent
c1c888a9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/client-auth.sgml
+5
-4
5 additions, 4 deletions
doc/src/sgml/client-auth.sgml
doc/src/sgml/ref/pg_ctl-ref.sgml
+17
-5
17 additions, 5 deletions
doc/src/sgml/ref/pg_ctl-ref.sgml
src/bin/pg_ctl/pg_ctl.sh
+20
-7
20 additions, 7 deletions
src/bin/pg_ctl/pg_ctl.sh
with
42 additions
and
16 deletions
doc/src/sgml/client-auth.sgml
+
5
−
4
View file @
196700c3
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.2
0
2001/09/21 2
0:31:41
tgl Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.2
1
2001/09/21 2
1:10:56
tgl Exp $ -->
<chapter id="client-authentication">
<chapter id="client-authentication">
<title>Client Authentication</title>
<title>Client Authentication</title>
...
@@ -333,9 +333,10 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
...
@@ -333,9 +333,10 @@ hostssl <replaceable>database</replaceable> <replaceable>IP-address</replaceable
<para>
<para>
The <filename>pg_hba.conf</filename> file is loaded only on startup
The <filename>pg_hba.conf</filename> file is loaded only on startup
and when the <application>postmaster</> receives a <systemitem>SIGHUP</systemitem> signal. If
and when the <application>postmaster</> receives a
you edit the file on an active system, you will need to issue a
<systemitem>SIGHUP</systemitem> signal. If you edit the file on an
<systemitem>SIGHUP</systemitem> to the <application>postmaster</> using <application>kill</>
active system, you will need to signal the <application>postmaster</>
(using <application>pg_ctl reload</> or <application>kill -HUP</>)
to make it re-read the file.
to make it re-read the file.
</para>
</para>
...
...
This diff is collapsed.
Click to expand it.
doc/src/sgml/ref/pg_ctl-ref.sgml
+
17
−
5
View file @
196700c3
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.
8
2001/09/
03 12:57:50 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_ctl-ref.sgml,v 1.
9
2001/09/
21 21:10:56 tgl
Exp $
Postgres documentation
Postgres documentation
-->
-->
...
@@ -58,6 +58,11 @@ Postgres documentation
...
@@ -58,6 +58,11 @@ Postgres documentation
<arg>-o <replaceable>options</replaceable></arg>
<arg>-o <replaceable>options</replaceable></arg>
<sbr>
<sbr>
<command>pg_ctl</command>
<command>pg_ctl</command>
<arg choice="plain">reload</arg>
<arg>-s</arg>
<arg>-D <replaceable>datadir</replaceable></arg>
<sbr>
<command>pg_ctl</command>
<arg choice="plain">status</arg>
<arg choice="plain">status</arg>
<arg>-D <replaceable>datadir</replaceable></arg>
<arg>-D <replaceable>datadir</replaceable></arg>
</cmdsynopsis>
</cmdsynopsis>
...
@@ -73,7 +78,7 @@ Postgres documentation
...
@@ -73,7 +78,7 @@ Postgres documentation
the status of a running postmaster. Although the postmaster can be
the status of a running postmaster. Although the postmaster can be
started manually, <application>pg_ctl</application> encapulates
started manually, <application>pg_ctl</application> encapulates
tasks such as redirecting log output, properly detaching from the
tasks such as redirecting log output, properly detaching from the
terminal and process group, and
additionally provides an
option for
terminal and process group, and
it provides convenient
option
s
for
controlled shut down.
controlled shut down.
</para>
</para>
...
@@ -93,7 +98,7 @@ Postgres documentation
...
@@ -93,7 +98,7 @@ Postgres documentation
</para>
</para>
<para>
<para>
In <option>stop</option> mode, the postmaster that is running
o
n
In <option>stop</option> mode, the postmaster that is running
i
n
the specified data directory is shut down. Three different
the specified data directory is shut down. Three different
shutdown methods can be selected with the <option>-m</option>
shutdown methods can be selected with the <option>-m</option>
option: <quote>Smart</quote> mode waits for all the clients to
option: <quote>Smart</quote> mode waits for all the clients to
...
@@ -101,7 +106,6 @@ Postgres documentation
...
@@ -101,7 +106,6 @@ Postgres documentation
not wait for clients to disconnect. All active transactions will
not wait for clients to disconnect. All active transactions will
be rolled back. <quote>Immediate</quote> mode will abort without
be rolled back. <quote>Immediate</quote> mode will abort without
complete shutdown. This will lead to a recovery run on restart.
complete shutdown. This will lead to a recovery run on restart.
By the default, stop mode waits for the shutdown to complete.
</para>
</para>
<para>
<para>
...
@@ -110,6 +114,14 @@ Postgres documentation
...
@@ -110,6 +114,14 @@ Postgres documentation
options.
options.
</para>
</para>
<para>
<option>reload</option> mode simply sends the postmaster a SIGHUP signal,
causing it to reread its configuration files
(<filename>postgresql.conf</filename>, <filename>pg_hba.conf</filename>,
etc). This allows changing of configuration-file options that do not
require a complete restart to take effect.
</para>
<para>
<para>
<option>status</option> mode checks whether a postmaster is running
<option>status</option> mode checks whether a postmaster is running
and if so displays the <acronym>PID</acronym> and the command line
and if so displays the <acronym>PID</acronym> and the command line
...
@@ -188,7 +200,7 @@ Postgres documentation
...
@@ -188,7 +200,7 @@ Postgres documentation
<term>-w</term>
<term>-w</term>
<listitem>
<listitem>
<para>
<para>
Wait for the start or s
t
utdown to complete. Times out after
Wait for the start or s
h
utdown to complete. Times out after
60 seconds. This is the default for shutdowns.
60 seconds. This is the default for shutdowns.
</para>
</para>
</listitem>
</listitem>
...
...
This diff is collapsed.
Click to expand it.
src/bin/pg_ctl/pg_ctl.sh
+
20
−
7
View file @
196700c3
...
@@ -2,26 +2,27 @@
...
@@ -2,26 +2,27 @@
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
#
#
# pg_ctl.sh--
# pg_ctl.sh--
# Start/Stop/Restart/Report status of postmaster
# Start/Stop/Restart/
HUP/
Report status of postmaster
#
#
# Copyright (c) 2001 PostgreSQL Global Development Group
# Copyright (c) 2001 PostgreSQL Global Development Group
#
#
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2
3
2001/0
7/11 19:36:41 momjian
Exp $
# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2
4
2001/0
9/21 21:10:56 tgl
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
CMDNAME
=
`
basename
$0
`
CMDNAME
=
`
basename
$0
`
help
=
"
\
help
=
"
\
$CMDNAME
is a utility to start, stop, restart,
and report the status
$CMDNAME
is a utility to start, stop, restart,
reload configuration files,
of a PostgreSQL server.
or report the status
of a PostgreSQL server.
Usage:
Usage:
$CMDNAME
start [-w] [-D DATADIR] [-s] [-l FILENAME] [-o
\"
OPTIONS
\"
]
$CMDNAME
start [-w] [-D DATADIR] [-s] [-l FILENAME] [-o
\"
OPTIONS
\"
]
$CMDNAME
stop [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
$CMDNAME
stop [-W] [-D DATADIR] [-s] [-m SHUTDOWN-MODE]
$CMDNAME
restart [-w] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] [-o
\"
OPTIONS
\"
]
$CMDNAME
restart [-w] [-D DATADIR] [-s] [-m SHUTDOWN-MODE] [-o
\"
OPTIONS
\"
]
$CMDNAME
reload [-D DATADIR] [-s]
$CMDNAME
status [-D DATADIR]
$CMDNAME
status [-D DATADIR]
Common options:
Common options:
...
@@ -174,6 +175,9 @@ do
...
@@ -174,6 +175,9 @@ do
restart
)
restart
)
op
=
"restart"
op
=
"restart"
;;
;;
reload
)
op
=
"reload"
;;
status
)
status
)
op
=
"status"
op
=
"status"
;;
;;
...
@@ -224,6 +228,10 @@ case "$shutdown_mode" in
...
@@ -224,6 +228,10 @@ case "$shutdown_mode" in
;;
;;
esac
esac
if
[
"
$op
"
=
"reload"
]
;
then
sig
=
"-HUP"
wait
=
no
fi
DEFPOSTOPTS
=
$PGDATA
/postmaster.opts.default
DEFPOSTOPTS
=
$PGDATA
/postmaster.opts.default
POSTOPTSFILE
=
$PGDATA
/postmaster.opts
POSTOPTSFILE
=
$PGDATA
/postmaster.opts
...
@@ -247,7 +255,7 @@ if [ "$op" = "status" ];then
...
@@ -247,7 +255,7 @@ if [ "$op" = "status" ];then
fi
fi
fi
fi
if
[
"
$op
"
=
"stop"
-o
"
$op
"
=
"restart"
]
;
then
if
[
"
$op
"
=
"stop"
-o
"
$op
"
=
"restart"
-o
"
$op
"
=
"reload"
]
;
then
if
[
-f
$PIDFILE
]
;
then
if
[
-f
$PIDFILE
]
;
then
PID
=
`
sed
-n
1p
$PIDFILE
`
PID
=
`
sed
-n
1p
$PIDFILE
`
if
[
$PID
-lt
0
]
;
then
if
[
$PID
-lt
0
]
;
then
...
@@ -281,7 +289,12 @@ if [ "$op" = "stop" -o "$op" = "restart" ];then
...
@@ -281,7 +289,12 @@ if [ "$op" = "stop" -o "$op" = "restart" ];then
done
done
$silence_echo
echo
"done"
$silence_echo
echo
"done"
fi
fi
$silence_echo
echo
"postmaster successfully shut down"
if
[
"
$op
"
=
"reload"
]
;
then
$silence_echo
echo
"postmaster successfully signaled"
else
$silence_echo
echo
"postmaster successfully shut down"
fi
else
# ! -f $PIDFILE
else
# ! -f $PIDFILE
echo
"
$CMDNAME
: cannot find
$PIDFILE
"
1>&2
echo
"
$CMDNAME
: cannot find
$PIDFILE
"
1>&2
...
@@ -292,7 +305,7 @@ if [ "$op" = "stop" -o "$op" = "restart" ];then
...
@@ -292,7 +305,7 @@ if [ "$op" = "stop" -o "$op" = "restart" ];then
exit
1
exit
1
fi
fi
fi
fi
fi
# stop
or
restart
fi
# stop
,
restart
, reload
if
[
"
$op
"
=
"start"
-o
"
$op
"
=
"restart"
]
;
then
if
[
"
$op
"
=
"start"
-o
"
$op
"
=
"restart"
]
;
then
oldpid
=
""
oldpid
=
""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment