1999-07-22 17:09:15 +02:00
|
|
|
<!--
|
2002-03-22 20:20:45 +01:00
|
|
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.28 2002/03/22 19:20:43 petere Exp $
|
2001-12-08 04:24:40 +01:00
|
|
|
PostgreSQL documentation
|
1999-07-22 17:09:15 +02:00
|
|
|
-->
|
|
|
|
|
2000-12-26 00:15:27 +01:00
|
|
|
<refentry id="app-postmaster">
|
2000-11-14 19:11:32 +01:00
|
|
|
<docinfo>
|
2000-12-26 00:15:27 +01:00
|
|
|
<date>2000-12-25</date>
|
2000-11-14 19:11:32 +01:00
|
|
|
</docinfo>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<refmeta>
|
2000-11-14 19:11:32 +01:00
|
|
|
<refentrytitle id="APP-POSTMASTER-TITLE"><application>postmaster</application></refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
1999-05-26 19:25:38 +02:00
|
|
|
<refmiscinfo>Application</refmiscinfo>
|
|
|
|
</refmeta>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<refnamediv>
|
2000-11-14 19:11:32 +01:00
|
|
|
<refname id="postmaster-ref">postmaster</refname>
|
2001-09-03 14:57:50 +02:00
|
|
|
<refpurpose><productname>PostgreSQL</productname> multiuser database server</refpurpose>
|
1999-05-26 19:25:38 +02:00
|
|
|
</refnamediv>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<refsynopsisdiv>
|
2000-11-14 19:11:32 +01:00
|
|
|
<cmdsynopsis>
|
|
|
|
<command>postmaster</command>
|
|
|
|
<arg>-A <group choice="plain"><arg>0</arg><arg>1</arg></group></arg>
|
|
|
|
<arg>-B <replaceable>nbuffers</replaceable></arg>
|
|
|
|
<arg>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
|
|
|
<arg>-d <replaceable>debug-level</replaceable></arg>
|
|
|
|
<arg>-D <replaceable>datadir</replaceable></arg>
|
|
|
|
<arg>-F</arg>
|
|
|
|
<arg>-h <replaceable>hostname</replaceable></arg>
|
|
|
|
<arg>-i</arg>
|
2000-12-01 00:20:51 +01:00
|
|
|
<arg>-k <replaceable>directory</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<arg>-l</arg>
|
|
|
|
<arg>-N <replaceable>max-connections</replaceable></arg>
|
|
|
|
<arg>-o <replaceable>extra-options</replaceable></arg>
|
|
|
|
<arg>-p <replaceable>port</replaceable></arg>
|
|
|
|
<arg>-S</arg>
|
2001-11-25 02:11:36 +01:00
|
|
|
<arg>--<replaceable>name</replaceable>=<replaceable>value</replaceable></arg>
|
2000-11-14 19:11:32 +01:00
|
|
|
<group><arg>-n</arg><arg>-s</arg></group>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<application>postmaster</application> is the
|
2001-09-03 14:57:50 +02:00
|
|
|
<productname>PostgreSQL</productname> multiuser database server.
|
2000-11-14 19:11:32 +01:00
|
|
|
In order for a client application to access a database it connects
|
|
|
|
(over a network or locally) to a running
|
|
|
|
<application>postmaster</application>. The
|
|
|
|
<application>postmaster</application> then starts a separate server
|
2000-12-26 00:15:27 +01:00
|
|
|
process (<quote><xref linkend="app-postgres"></quote>) to handle
|
|
|
|
the connection. The <application>postmaster</application> also
|
|
|
|
manages the communication among server processes.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
By default the <application>postmaster</application> starts in the
|
|
|
|
foreground and prints log messages to the standard output. In
|
|
|
|
practical applications the <application>postmaster</application>
|
|
|
|
should be started as a background process, perhaps at boot time.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
One <application>postmaster</application> always manages the data
|
|
|
|
from exactly one database cluster. A database cluster is a
|
|
|
|
collection of databases that is stored at a common file system
|
|
|
|
location. When the postmaster starts it needs to know the location
|
|
|
|
of the database cluster files (<quote>data area</quote>). This is
|
|
|
|
done with the <option>-D</option> invocation option or the
|
|
|
|
<envar>PGDATA</envar> environment variable; there is no default.
|
|
|
|
More than one postmaster process can run on a system at one time,
|
|
|
|
as long as they use different data areas and different
|
|
|
|
communication ports (see below). A data area is created with <xref
|
|
|
|
linkend="app-initdb">.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<refsect2 id="app-postmaster-options">
|
|
|
|
<title>Options</title>
|
1999-05-26 19:25:38 +02:00
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
<application>postmaster</application> accepts the following
|
|
|
|
command line arguments. For a detailed discussion of the options
|
|
|
|
consult the <citetitle>Administrator's Guide</citetitle>. You can
|
|
|
|
also save typing most of these options by setting up a
|
|
|
|
configuration file.
|
1999-05-26 19:25:38 +02:00
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-A 0|1</term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Enables run-time assert checks, which is a debugging aid to
|
|
|
|
detect programming mistakes. This is only available if it was
|
|
|
|
enabled during compilation. If so, the default is on.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-B <replaceable class="parameter">nbuffers</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Sets the number of shared buffers for use by the server
|
|
|
|
processes. This value defaults to 64 buffers, where each
|
|
|
|
buffer is 8 kB.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-c <replaceable>name</replaceable>=<replaceable>value</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Sets a named run-time parameter. Consult the
|
|
|
|
<citetitle>Administrator's Guide</citetitle> for a list and
|
|
|
|
descriptions. Most of the other command line options are in
|
2001-11-25 02:11:36 +01:00
|
|
|
fact short forms of such a parameter assignment. <option>-c</>
|
|
|
|
can appear multiple times to set multiple parameters.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-d <replaceable>debug-level</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Sets the debug level. The higher this value is set, the more
|
Commit to match discussed elog() changes. Only update is that LOG is
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
2002-03-02 22:39:36 +01:00
|
|
|
debugging output is written to the server log. Values are from
|
|
|
|
1 to 5.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-D <replaceable class="parameter">datadir</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Specifies the file system location of the data directory. See
|
|
|
|
discussion above.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-F</term>
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Disables <function>fsync</function> calls for performance
|
2001-11-25 02:11:36 +01:00
|
|
|
improvement, at the risk of data corruption in event of a
|
|
|
|
system crash. Read the detailed documentation before using this!
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
</para>
|
2000-11-14 19:11:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>-h <replaceable class="parameter">hostname</replaceable></term>
|
|
|
|
<listitem>
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<para>
|
2001-11-28 21:49:10 +01:00
|
|
|
Specifies the TCP/IP host name or address on which the
|
2000-11-14 19:11:32 +01:00
|
|
|
<application>postmaster</application> is to listen for
|
2000-12-01 00:20:51 +01:00
|
|
|
connections from client applications. Defaults to
|
2001-11-28 21:49:10 +01:00
|
|
|
listening on all configured addresses (including
|
|
|
|
<systemitem class="systemname">localhost</systemitem>).
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term>-i</term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Allows clients to connect via TCP/IP (Internet domain)
|
|
|
|
connections. Without this option, only local Unix domain
|
|
|
|
socket connections are accepted.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<varlistentry>
|
2000-12-26 00:15:27 +01:00
|
|
|
<term>-k <replaceable class="parameter">directory</replaceable></term>
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-12-01 00:20:51 +01:00
|
|
|
Specifies the directory of the Unix-domain socket on which the
|
2000-11-14 19:11:32 +01:00
|
|
|
<application>postmaster</application> is to listen for
|
2000-12-01 00:20:51 +01:00
|
|
|
connections from client applications. The default is normally
|
|
|
|
<filename>/tmp</filename>, but can be changed at build time.
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
</para>
|
2000-11-14 19:11:32 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>-l</term>
|
|
|
|
<listitem>
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Enables secure connections using SSL. The <option>-i</option>
|
|
|
|
option is also required. You must have compiled with SSL
|
|
|
|
enabled to use this option.
|
UUNET is looking into offering PostgreSQL as a part of a managed web
hosting product, on both shared and dedicated machines. We currently
offer Oracle and MySQL, and it would be a nice middle-ground.
However, as shipped, PostgreSQL lacks the following features we need
that MySQL has:
1. The ability to listen only on a particular IP address. Each
hosting customer has their own IP address, on which all of their
servers (http, ftp, real media, etc.) run.
2. The ability to place the Unix-domain socket in a mode 700 directory.
This allows us to automatically create an empty database, with an
empty DBA password, for new or upgrading customers without having
to interactively set a DBA password and communicate it to (or from)
the customer. This in turn cuts down our install and upgrade times.
3. The ability to connect to the Unix-domain socket from within a
change-rooted environment. We run CGI programs chrooted to the
user's home directory, which is another reason why we need to be
able to specify where the Unix-domain socket is, instead of /tmp.
4. The ability to, if run as root, open a pid file in /var/run as
root, and then setuid to the desired user. (mysqld -u can almost
do this; I had to patch it, too).
The patch below fixes problem 1-3. I plan to address #4, also, but
haven't done so yet. These diffs are big enough that they should give
the PG development team something to think about in the meantime :-)
Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get
out what I have, which works (for the problems it tackles), now.
With these changes, we can set up and run PostgreSQL with scripts the
same way we can with apache or proftpd or mysql.
In summary, this patch makes the following enhancements:
1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT,
and command line options -k --unix-socket to the relevant programs.
2. Adds a -h option to postmaster to set the hostname or IP address to
listen on instead of the default INADDR_ANY.
3. Extends some library interfaces to support the above.
4. Fixes a few memory leaks in PQconnectdb().
The default behavior is unchanged from stock 7.0.2; if you don't use
any of these new features, they don't change the operation.
David J. MacKenzie
2000-11-13 16:18:15 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
1999-10-08 06:28:57 +02:00
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-N <replaceable class="parameter">max-connections</replaceable></term>
|
1999-10-08 06:28:57 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Sets the maximum number of client connections that this
|
2000-12-26 00:15:27 +01:00
|
|
|
<application>postmaster</application> will accept. By
|
2001-11-25 02:11:36 +01:00
|
|
|
default, this value is 32, but it can be set as high as your
|
|
|
|
system will support. (Note that
|
2000-12-26 00:15:27 +01:00
|
|
|
<option>-B</option> is required to be at least twice
|
2001-11-25 02:11:36 +01:00
|
|
|
<option>-N</option>. See the <citetitle>Administrator's
|
|
|
|
Guide</citetitle> for a discussion of system resource requirements
|
|
|
|
for large numbers of client connections.)
|
1999-10-08 06:28:57 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
<term>-o <replaceable class="parameter">extra-options</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
The command line-style options specified in <replaceable
|
2000-12-26 00:15:27 +01:00
|
|
|
class="parameter">extra-options</replaceable> are passed to
|
2000-11-14 19:11:32 +01:00
|
|
|
all backend server processes started by this
|
|
|
|
<application>postmaster</application>. See <xref
|
2000-12-26 00:15:27 +01:00
|
|
|
linkend="app-postgres"> for possibilities. If the option
|
|
|
|
string contains any spaces, the entire string must be quoted.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term>-p <replaceable class="parameter">port</replaceable></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Specifies the TCP/IP port or local Unix domain socket file
|
|
|
|
extension on which the <application>postmaster</application>
|
|
|
|
is to listen for connections from client applications.
|
|
|
|
Defaults to the value of the <envar>PGPORT</envar> environment
|
|
|
|
variable, or if <envar>PGPORT</envar> is not set, then
|
|
|
|
defaults to the value established during compilation (normally
|
|
|
|
5432). If you specify a port other than the default port,
|
|
|
|
then all client applications must specify the same port using
|
|
|
|
either command-line options or <envar>PGPORT</envar>.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2000-11-14 19:11:32 +01:00
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term>-S</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Specifies that the <application>postmaster</application>
|
|
|
|
process should start up in silent mode. That is, it will
|
|
|
|
disassociate from the user's (controlling) terminal, start its
|
|
|
|
own process group, and redirect its standard output and
|
|
|
|
standard error to <filename>/dev/null</filename>.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Using this switch discards all logging output, which is
|
|
|
|
probably not what you want, since it makes it very difficult
|
|
|
|
to troubleshoot problems. See below for a better way to start
|
2000-12-26 00:15:27 +01:00
|
|
|
the <application>postmaster</application> in the background.
|
2000-11-14 19:11:32 +01:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2001-11-25 02:11:36 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term>--<replaceable>name</replaceable>=<replaceable>value</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2001-11-26 20:41:55 +01:00
|
|
|
Sets a named run-time parameter; a shorter form of
|
|
|
|
<option>-c</>.
|
|
|
|
</para>
|
2001-11-25 02:11:36 +01:00
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
Two additional command line options are available for debugging
|
|
|
|
problems that cause a backend to die abnormally. These options
|
|
|
|
control the behavior of the <application>postmaster</application>
|
|
|
|
in this situation, and <emphasis>neither option is intended for
|
|
|
|
use in ordinary operation</emphasis>.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The ordinary strategy for this situation is to notify all other
|
|
|
|
backends that they must terminate and then reinitialize the shared
|
2000-11-14 19:11:32 +01:00
|
|
|
memory and semaphores. This is because an errant backend could
|
|
|
|
have corrupted some shared state before terminating.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
These special-case options are:
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term>-n</term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<application>postmaster</application>
|
2000-03-26 09:04:54 +02:00
|
|
|
will not reinitialize shared data structures. A knowledgeable system
|
|
|
|
programmer can then use a debugger
|
|
|
|
to examine shared memory and semaphore state.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term>-s</term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<application>postmaster</application>
|
|
|
|
will stop all other backend processes by sending the signal
|
|
|
|
<literal>SIGSTOP</literal>,
|
|
|
|
but will not cause them to terminate. This permits system programmers
|
|
|
|
to collect core dumps from all backend processes by hand.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
|
|
|
|
1999-05-27 17:49:15 +02:00
|
|
|
<refsect2 id="R2-APP-POSTMASTER-2">
|
1999-05-26 19:25:38 +02:00
|
|
|
<title>
|
|
|
|
Outputs
|
|
|
|
</title>
|
|
|
|
<para>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><computeroutput>
|
|
|
|
semget: No space left on device
|
|
|
|
</computeroutput></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
If you see this message, you should run the
|
|
|
|
<application>ipcclean</application>
|
2000-03-26 09:04:54 +02:00
|
|
|
command. After doing so, try starting
|
1999-05-26 19:25:38 +02:00
|
|
|
<application>postmaster</application>
|
|
|
|
again. If this still doesn't work, you probably need to configure
|
|
|
|
your kernel for shared memory and semaphores as described in the
|
|
|
|
installation notes. If you run multiple instances of
|
|
|
|
<application>postmaster</application>
|
|
|
|
on a single host, or have a kernel with particularly small shared memory
|
|
|
|
and/or semaphore limits, you may have to reconfigure your kernel to increase
|
|
|
|
its shared memory or semaphore parameters.
|
|
|
|
|
|
|
|
<tip>
|
|
|
|
<para>
|
|
|
|
You may be able to postpone
|
2001-11-28 21:49:10 +01:00
|
|
|
reconfiguring your kernel by decreasing <option>-B</option> to reduce
|
|
|
|
the shared memory consumption of <productname>PostgreSQL</>,
|
|
|
|
and/or by reducing <option>-N</option> to reduce the semaphore
|
1999-05-26 19:25:38 +02:00
|
|
|
consumption.
|
|
|
|
</para>
|
|
|
|
</tip>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
1999-07-06 19:16:42 +02:00
|
|
|
<term><computeroutput>
|
|
|
|
StreamServerPort: cannot bind to port
|
|
|
|
</computeroutput></term>
|
1999-05-26 19:25:38 +02:00
|
|
|
<listitem>
|
|
|
|
<para>
|
2000-03-26 09:04:54 +02:00
|
|
|
If you see this message, you should make certain that there is no
|
|
|
|
other <application>postmaster</application>
|
|
|
|
process already running on the same port number. The easiest way to
|
|
|
|
determine this is by using the command
|
2000-12-26 00:15:27 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>ps ax | grep postmaster</userinput>
|
|
|
|
</screen>
|
|
|
|
or
|
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>ps -e | grep postmaster</userinput>
|
|
|
|
</screen>
|
|
|
|
depending on your system.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If you
|
|
|
|
are sure that no other
|
|
|
|
<application>postmaster</application>
|
|
|
|
processes are running and you still get this error, try specifying a
|
|
|
|
different port using the
|
|
|
|
<literal>-p</literal>
|
|
|
|
option. You may also get this error if you terminate the
|
|
|
|
<application>postmaster</application>
|
|
|
|
and immediately restart it using the same port; in this case, you must
|
|
|
|
simply wait a few seconds until the operating system closes the port
|
|
|
|
before trying again. Finally, you may get this error if you specify
|
|
|
|
a port number that your operating system considers to be reserved.
|
|
|
|
For example, many versions of Unix consider port numbers under 1024 to
|
|
|
|
be <firstterm>trusted</firstterm>
|
|
|
|
and only permit the Unix superuser to access them.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect2>
|
2000-11-14 19:11:32 +01:00
|
|
|
</refsect1>
|
1999-05-26 19:25:38 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<refsect1>
|
|
|
|
<title>Notes</title>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
If at all possible, <emphasis>do not</emphasis> use
|
|
|
|
<literal>SIGKILL</literal> to kill the
|
|
|
|
<application>postmaster</application>. This will prevent
|
|
|
|
<application>postmaster</application> from freeing the system
|
|
|
|
resources (e.g., shared memory and semaphores) that it holds before
|
|
|
|
terminating.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-12-26 00:15:27 +01:00
|
|
|
To terminate the <application>postmaster</application> normally,
|
|
|
|
the signals <literal>SIGTERM</literal>, <literal>SIGINT</literal>,
|
|
|
|
or <literal>SIGQUIT</literal> can be used. The first will wait for
|
2000-11-14 19:11:32 +01:00
|
|
|
all clients to terminate before quitting, the second will
|
|
|
|
forcefully disconnect all clients, and the third will quit
|
2001-11-25 02:11:36 +01:00
|
|
|
immediately without proper shutdown, resulting in a recovery run
|
2000-11-14 19:11:32 +01:00
|
|
|
during restart.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
The utility command <xref linkend="app-pg-ctl"> can be used to
|
2000-12-26 00:15:27 +01:00
|
|
|
start and shut down the <application>postmaster</application>
|
|
|
|
safely and comfortably.
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
2001-11-28 21:49:10 +01:00
|
|
|
|
|
|
|
<para>
|
|
|
|
The <option>--</> options will not work on FreeBSD or OpenBSD.
|
|
|
|
Use <option>-c</> instead. This is a bug in the affected operating
|
|
|
|
systems; a future release of <productname>PostgreSQL</productname> will
|
|
|
|
provide a workaround if this is not fixed.
|
|
|
|
</para>
|
|
|
|
|
1999-05-26 19:25:38 +02:00
|
|
|
</refsect1>
|
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<refsect1 id="app-postmaster-usage">
|
|
|
|
<title>Usage</title>
|
|
|
|
<para>
|
|
|
|
To start <application>postmaster</application> in the background
|
|
|
|
using default values, type:
|
1999-05-26 19:25:38 +02:00
|
|
|
|
2000-11-14 19:11:32 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>nohup postmaster >logfile 2>&1 </dev/null &</userinput>
|
|
|
|
</screen>
|
1999-05-26 19:25:38 +02:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
2000-11-14 19:11:32 +01:00
|
|
|
To start <application>postmaster</application> with a specific
|
|
|
|
port:
|
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>postmaster -p 1234</userinput>
|
|
|
|
</screen>
|
1999-05-26 19:25:38 +02:00
|
|
|
This command will start up <application>postmaster</application>
|
2000-11-14 19:11:32 +01:00
|
|
|
communicating through the port 1234. In order to connect to this
|
|
|
|
<application>postmaster</application> using psql, you would need to
|
|
|
|
run it as
|
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>psql -p 1234</userinput>
|
|
|
|
</screen>
|
1999-05-26 19:25:38 +02:00
|
|
|
or set the environment variable <envar>PGPORT</envar>:
|
2000-11-14 19:11:32 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>export PGPORT=1234</userinput>
|
|
|
|
<prompt>$</prompt> <userinput>psql</userinput>
|
|
|
|
</screen>
|
1999-05-27 17:49:15 +02:00
|
|
|
</para>
|
2001-11-25 02:11:36 +01:00
|
|
|
|
|
|
|
<para>
|
2002-03-22 20:20:45 +01:00
|
|
|
Named run-time parameters can be set in either of these styles:
|
2001-11-25 02:11:36 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$</prompt> <userinput>postmaster -c sort_mem=1234</userinput>
|
|
|
|
<prompt>$</prompt> <userinput>postmaster --sort-mem=1234</userinput>
|
|
|
|
</screen>
|
|
|
|
Either form overrides whatever setting might exist for <literal>sort_mem</>
|
|
|
|
in <filename>postgresql.conf</>. Notice that underscores in parameter
|
|
|
|
names can be written as either underscore or dash on the command line.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<tip>
|
|
|
|
<para>
|
|
|
|
Except for short-term experiments,
|
|
|
|
it's probably better practice to edit the setting in
|
|
|
|
<filename>postgresql.conf</> than to rely on a command-line switch
|
|
|
|
to set a parameter.
|
|
|
|
</para>
|
|
|
|
</tip>
|
1999-05-26 19:25:38 +02:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:nil
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../reference.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:"/usr/lib/sgml/catalog"
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
-->
|