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

Commit 5266f22

Browse files
committed
Merge postmaster and postgres command into just postgres. postmaster
symlink is kept for now for compatibility. To call single-user mode, use postgres --single.
1 parent 44cb3ae commit 5266f22

37 files changed

+1121
-1324
lines changed

doc/src/sgml/arch-dev.sgml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/arch-dev.sgml,v 2.26 2006/03/10 19:10:46 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/arch-dev.sgml,v 2.27 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="overview">
44
<title>Overview of PostgreSQL Internals</title>
@@ -124,13 +124,11 @@
124124
know ahead of time how many connections will be made, we have to
125125
use a <firstterm>master process</firstterm> that spawns a new
126126
server process every time a connection is requested. This master
127-
process is called <literal>postmaster</literal> and listens at a
127+
process is called <literal>postgres</literal> and listens at a
128128
specified TCP/IP port for incoming connections. Whenever a request
129-
for a connection is detected the <literal>postmaster</literal>
130-
process spawns a new server process called
131-
<literal>postgres</literal>. The server tasks
132-
(<literal>postgres</literal> processes) communicate with each
133-
other using <firstterm>semaphores</firstterm> and
129+
for a connection is detected the <literal>postgres</literal>
130+
process spawns a new server process. The server tasks
131+
communicate with each other using <firstterm>semaphores</firstterm> and
134132
<firstterm>shared memory</firstterm> to ensure data integrity
135133
throughout concurrent data access.
136134
</para>

doc/src/sgml/backup.sgml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.80 2006/04/23 03:39:48 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.81 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -296,7 +296,7 @@ tar -cf backup.tar /usr/local/pgsql/data
296296
(mainly because <command>tar</command> and similar tools do not take an
297297
atomic snapshot of the state of the file system at a point in
298298
time). Information about stopping the server can be found in
299-
<xref linkend="postmaster-shutdown">. Needless to say that you
299+
<xref linkend="server-shutdown">. Needless to say that you
300300
also need to shut down the server before restoring the data.
301301
</para>
302302
</listitem>
@@ -778,7 +778,7 @@ SELECT pg_stop_backup();
778778
</para>
779779

780780
<para>
781-
It is also possible to make a backup dump while the postmaster is
781+
It is also possible to make a backup dump while the server is
782782
stopped. In this case, you obviously cannot use
783783
<function>pg_start_backup</> or <function>pg_stop_backup</>, and
784784
you will therefore be left to your own devices to keep track of which
@@ -796,7 +796,7 @@ SELECT pg_stop_backup();
796796
<orderedlist>
797797
<listitem>
798798
<para>
799-
Stop the postmaster, if it's running.
799+
Stop the server, if it's running.
800800
</para>
801801
</listitem>
802802
<listitem>
@@ -853,9 +853,9 @@ SELECT pg_stop_backup();
853853
</listitem>
854854
<listitem>
855855
<para>
856-
Start the postmaster. The postmaster will go into recovery mode and
856+
Start the server. The server will go into recovery mode and
857857
proceed to read through the archived WAL files it needs. Upon completion
858-
of the recovery process, the postmaster will rename
858+
of the recovery process, the server will rename
859859
<filename>recovery.conf</> to <filename>recovery.done</> (to prevent
860860
accidentally re-entering recovery mode in case of a crash later) and then
861861
commence normal database operations.
@@ -1269,7 +1269,7 @@ mv /usr/local/pgsql /usr/local/pgsql.old
12691269
cd ~/postgresql-&version;
12701270
gmake install
12711271
initdb -D /usr/local/pgsql/data
1272-
postmaster -D /usr/local/pgsql/data
1272+
postgres -D /usr/local/pgsql/data
12731273
psql -f backup postgres
12741274
</programlisting>
12751275

doc/src/sgml/client-auth.sgml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.90 2006/06/16 15:16:16 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/client-auth.sgml,v 1.91 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="client-authentication">
44
<title>Client Authentication</title>
@@ -436,10 +436,10 @@ hostnossl <replaceable>database</replaceable> <replaceable>user</replaceable>
436436

437437
<para>
438438
The <filename>pg_hba.conf</filename> file is read on start-up and when
439-
the main server process (<command>postmaster</>) receives a
439+
the main server process receives a
440440
<systemitem>SIGHUP</systemitem><indexterm><primary>SIGHUP</primary></indexterm>
441441
signal. If you edit the file on an
442-
active system, you will need to signal the <command>postmaster</>
442+
active system, you will need to signal the server
443443
(using <literal>pg_ctl reload</> or <literal>kill -HUP</>) to make it
444444
re-read the file.
445445
</para>
@@ -866,10 +866,10 @@ local db1,db2,@demodbs all md5
866866

867867
<para>
868868
The <filename>pg_ident.conf</filename> file is read on start-up and
869-
when the main server process (<command>postmaster</>) receives a
869+
when the main server process receives a
870870
<systemitem>SIGHUP</systemitem><indexterm><primary>SIGHUP</primary></indexterm>
871871
signal. If you edit the file on an
872-
active system, you will need to signal the <command>postmaster</>
872+
active system, you will need to signal the server
873873
(using <literal>pg_ctl reload</> or <literal>kill -HUP</>) to make it
874874
re-read the file.
875875
</para>

doc/src/sgml/config.sgml

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.64 2006/06/16 12:47:49 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.65 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -69,10 +69,9 @@ include 'filename'
6969
<indexterm>
7070
<primary>SIGHUP</primary>
7171
</indexterm>
72-
The configuration file is reread whenever the
73-
<command>postmaster</command> process receives a
72+
The configuration file is reread whenever the main server process receives a
7473
<systemitem>SIGHUP</> signal (which is most easily sent by means
75-
of <literal>pg_ctl reload</>). The <command>postmaster</command>
74+
of <literal>pg_ctl reload</>). The main server process
7675
also propagates this signal to all currently running server
7776
processes so that existing sessions also get the new
7877
value. Alternatively, you can send the signal to a single server
@@ -83,9 +82,9 @@ include 'filename'
8382

8483
<para>
8584
A second way to set these configuration parameters is to give them
86-
as a command line option to the <command>postmaster</command>, such as:
85+
as a command-line option to the <command>postgres</command> command, such as:
8786
<programlisting>
88-
postmaster -c log_connections=yes -c log_destination='syslog'
87+
postgres -c log_connections=yes -c log_destination='syslog'
8988
</programlisting>
9089
Command-line options override any conflicting settings in
9190
<filename>postgresql.conf</filename>. Note that this means you won't
@@ -116,7 +115,7 @@ env PGOPTIONS='-c geqo=off' psql
116115
and <xref linkend="sql-alterdatabase" endterm="sql-alterdatabase-title">,
117116
respectively, are used to configure these settings. Per-database
118117
settings override anything received from the
119-
<command>postmaster</command> command-line or the configuration
118+
<command>postgres</command> command-line or the configuration
120119
file, and in turn are overridden by per-user settings; both are
121120
overridden by per-session settings.
122121
</para>
@@ -192,7 +191,7 @@ SET ENABLE_SEQSCAN TO OFF;
192191
<para>
193192
Specifies the main server configuration file
194193
(customarily called <filename>postgresql.conf</>).
195-
This parameter can only be set on the postmaster command line.
194+
This parameter can only be set on the postgres command line.
196195
</para>
197196
</listitem>
198197
</varlistentry>
@@ -234,8 +233,7 @@ SET ENABLE_SEQSCAN TO OFF;
234233
<listitem>
235234
<para>
236235
Specifies the name of an additional process-id (PID) file that the
237-
<application>postmaster</> should create for use by server
238-
administration programs.
236+
server should create for use by server administration programs.
239237
This parameter can only be set at server start.
240238
</para>
241239
</listitem>
@@ -252,7 +250,7 @@ SET ENABLE_SEQSCAN TO OFF;
252250

253251
<para>
254252
If you wish to keep the configuration files elsewhere than the
255-
data directory, the postmaster's <option>-D</option>
253+
data directory, the postgres <option>-D</option>
256254
command-line option or <envar>PGDATA</envar> environment variable
257255
must point to the directory containing the configuration files,
258256
and the <varname>data_directory</> parameter must be set in
@@ -269,15 +267,15 @@ SET ENABLE_SEQSCAN TO OFF;
269267
individually using the parameters <varname>config_file</>,
270268
<varname>hba_file</> and/or <varname>ident_file</>.
271269
<varname>config_file</> can only be specified on the
272-
<command>postmaster</command> command line, but the others can be
270+
<command>postgres</command> command line, but the others can be
273271
set within the main configuration file. If all three parameters plus
274272
<varname>data_directory</> are explicitly set, then it is not necessary
275273
to specify <option>-D</option> or <envar>PGDATA</envar>.
276274
</para>
277275

278276
<para>
279277
When setting any of these parameters, a relative path will be interpreted
280-
with respect to the directory in which the <command>postmaster</command>
278+
with respect to the directory in which <command>postgres</command>
281279
is started.
282280
</para>
283281
</sect1>
@@ -2679,7 +2677,7 @@ SELECT * FROM parent WHERE key = 2400;
26792677
below - anything else that looks like an escape is ignored. Other
26802678
characters are copied straight to the log line. Some escapes are
26812679
only recognized by session processes, and do not apply to
2682-
background processes such as the postmaster. <application>Syslog</>
2680+
background processes such as the main server process. <application>Syslog</>
26832681
produces its own
26842682
time stamp and process ID information, so you probably do not want to
26852683
use those escapes if you are using <application>syslog</>.
@@ -3467,7 +3465,7 @@ SELECT * FROM parent WHERE key = 2400;
34673465

34683466
<para>
34693467
Only superusers can change this setting, because it affects the
3470-
messages sent to the postmaster log as well as to the client.
3468+
messages sent to the server log as well as to the client.
34713469
</para>
34723470
</listitem>
34733471
</varlistentry>

doc/src/sgml/datatype.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.167 2006/04/23 03:39:49 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/datatype.sgml,v 1.168 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="datatype">
44
<title id="datatype-title">Data Types</title>
@@ -2153,7 +2153,7 @@ January 8 04:05:06 1999 PST
21532153
<listitem>
21542154
<para>
21552155
If <varname>timezone</> is not specified in
2156-
<filename>postgresql.conf</> nor as a postmaster command-line switch,
2156+
<filename>postgresql.conf</> nor as a server command-line option,
21572157
the server attempts to use the value of the <envar>TZ</envar>
21582158
environment variable as the default time zone. If <envar>TZ</envar>
21592159
is not defined or is not any of the time zone names known to

doc/src/sgml/func.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.321 2006/06/15 17:52:48 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.322 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="functions">
44
<title>Functions and Operators</title>
@@ -8935,7 +8935,7 @@ select current_date + s.a as dates from generate_series(0,14,7) as s(a);
89358935
<row>
89368936
<entry><literal><function>pg_postmaster_start_time</function>()</literal></entry>
89378937
<entry><type>timestamp with time zone</type></entry>
8938-
<entry><command>postmaster</> start time</entry>
8938+
<entry>server start time</entry>
89398939
</row>
89408940

89418941
<row>
@@ -9044,7 +9044,7 @@ SET search_path TO <replaceable>schema</> <optional>, <replaceable>schema</>, ..
90449044
<para>
90459045
<function>pg_postmaster_start_time</function> returns the
90469046
<type>timestamp with time zone</type> when the
9047-
<command>postmaster</> started.
9047+
server started.
90489048
</para>
90499049

90509050
<indexterm zone="functions-info">
@@ -9850,7 +9850,7 @@ SELECT set_config('log_statement_stats', 'off', false);
98509850

98519851
<para>
98529852
<function>pg_reload_conf</> sends a <systemitem>SIGHUP</> signal
9853-
to the <application>postmaster</>, causing the configuration files
9853+
to the server, causing the configuration files
98549854
to be reloaded by all server processes.
98559855
</para>
98569856

doc/src/sgml/installation.sgml

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.257 2006/06/16 15:16:16 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.258 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -33,7 +33,7 @@ mkdir /usr/local/pgsql/data
3333
chown postgres /usr/local/pgsql/data
3434
su - postgres
3535
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
36-
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
36+
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data &gt;logfile 2&gt;&amp;1 &amp;
3737
/usr/local/pgsql/bin/createdb test
3838
/usr/local/pgsql/bin/psql test
3939
</synopsis>
@@ -463,7 +463,7 @@ su - postgres
463463
(which you already have if you are upgrading).
464464
<programlisting>
465465
<userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
466-
<userinput>/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data</>
466+
<userinput>/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data</>
467467
</programlisting>
468468
Finally, restore your data with
469469
<screen>
@@ -1638,12 +1638,12 @@ postgres$ <userinput>/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data</>
16381638
database server. Do so now. The command should look something
16391639
like
16401640
<programlisting>
1641-
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
1641+
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data
16421642
</programlisting>
16431643
This will start the server in the foreground. To put the server
16441644
in the background use something like
16451645
<programlisting>
1646-
nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data \
1646+
nohup /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data \
16471647
&lt;/dev/null &gt;&gt;server.log 2&gt;&amp;1 &lt;/dev/null &amp;
16481648
</programlisting>
16491649
</para>
@@ -1654,12 +1654,6 @@ nohup /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data \
16541654
kill `cat /usr/local/pgsql/data/postmaster.pid`
16551655
</programlisting>
16561656
</para>
1657-
1658-
<para>
1659-
In order to allow TCP/IP connections (rather than only Unix
1660-
domain socket ones) you need to pass the <option>-i</> option to
1661-
<filename>postmaster</>.
1662-
</para>
16631657
</step>
16641658

16651659
<step>

doc/src/sgml/maintenance.sgml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.55 2006/04/23 03:39:52 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.56 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="maintenance">
44
<title>Routine Database Maintenance Tasks</title>
@@ -403,10 +403,10 @@ HINT: Stop the postmaster and use a standalone backend to VACUUM in "mydb".
403403
administrator recover without data loss, by manually executing the
404404
required <command>VACUUM</> commands. However, since the system will not
405405
execute commands once it has gone into the safety shutdown mode,
406-
the only way to do this is to stop the postmaster and use a standalone
406+
the only way to do this is to stop the server and use a single-user
407407
backend to execute <command>VACUUM</>. The shutdown mode is not enforced
408-
by a standalone backend. See the <xref linkend="app-postgres"> reference
409-
page for details about using a standalone backend.
408+
by a single-user backend. See the <xref linkend="app-postgres"> reference
409+
page for details about using a single-user backend.
410410
</para>
411411

412412
<para>
@@ -628,17 +628,17 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
628628
</para>
629629

630630
<para>
631-
If you simply direct the <systemitem>stderr</> of the
632-
<command>postmaster</command> into a
631+
If you simply direct the <systemitem>stderr</> of
632+
<command>postgres</command> into a
633633
file, you will have log output, but
634634
the only way to truncate the log file is to stop and restart
635-
the <command>postmaster</command>. This may be OK if you are using
635+
the server. This may be OK if you are using
636636
<productname>PostgreSQL</productname> in a development environment,
637637
but few production servers would find this behavior acceptable.
638638
</para>
639639

640640
<para>
641-
A better approach is to send the <command>postmaster</>'s
641+
A better approach is to send the server's
642642
<systemitem>stderr</> output to some type of log rotation program.
643643
There is a built-in log rotation program, which you can use by
644644
setting the configuration parameter <literal>redirect_stderr</> to
@@ -653,7 +653,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
653653
server software. For example, the <application>rotatelogs</application>
654654
tool included in the <productname>Apache</productname> distribution
655655
can be used with <productname>PostgreSQL</productname>. To do this,
656-
just pipe the <command>postmaster</>'s
656+
just pipe the server's
657657
<systemitem>stderr</> output to the desired program.
658658
If you start the server with
659659
<command>pg_ctl</>, then <systemitem>stderr</>

doc/src/sgml/manage-ag.sgml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/manage-ag.sgml,v 2.46 2006/05/04 16:07:28 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/manage-ag.sgml,v 2.47 2006/06/18 15:38:35 petere Exp $ -->
22

33
<chapter id="managing-databases">
44
<title>Managing Databases</title>
@@ -81,7 +81,7 @@ SELECT datname FROM pg_database;
8181
<para>
8282
In order to create a database, the <productname>PostgreSQL</>
8383
server must be up and running (see <xref
84-
linkend="postmaster-start">).
84+
linkend="server-start">).
8585
</para>
8686

8787
<para>
@@ -491,7 +491,7 @@ SELECT spcname FROM pg_tablespace;
491491
point to each of the non-built-in tablespaces defined in the cluster.
492492
Although not recommended, it is possible to adjust the tablespace
493493
layout by hand by redefining these links. Two warnings: do not do so
494-
while the postmaster is running; and after you restart the postmaster,
494+
while the server is running; and after you restart the server,
495495
update the <structname>pg_tablespace</> catalog to show the new
496496
locations. (If you do not, <literal>pg_dump</> will continue to show
497497
the old tablespace locations.)

0 commit comments

Comments
 (0)