-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.12 2001/08/25 18:52:41 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/backup.sgml,v 2.13 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="backup">
<title>Backup and Restore</title>
<formalpara>
<title>Use the custom dump format (V7.1).</title>
<para>
- If PostgreSQL was built on a system with the zlib compression library
+ If PostgreSQL was built on a system with the <application>zlib</> compression library
installed, the custom dump format will compress data as it writes it
to the output file. For large databases, this will produce similar dump
- sizes to using gzip, but has the added advantage that the tables can be
+ sizes to using <command>gzip</command>, but has the added advantage that the tables can be
restored selectively. The following command dumps a database using the
custom dump format:
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.8 2001/05/03 21:38:44 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v 2.9 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="charset">
<title>Localization</>
<firstterm>Locale</> support refers to an application respecting
cultural preferences regarding alphabets, sorting, number
formatting, etc. <productname>PostgreSQL</> uses the standard ISO
- C and POSIX-like locale facilities provided by the server operating
+ C and <acronym>POSIX</acronym>-like locale facilities provided by the server operating
system. For additional information refer to the documentation of your
system.
</para>
<tgroup cols="2">
<tbody>
<row>
- <entry>LC_COLLATE</>
+ <entry><envar>LC_COLLATE</></>
<entry>String sort order</>
</row>
<row>
- <entry>LC_CTYPE</>
+ <entry><envar>LC_CTYPE</></>
<entry>Character classification (What is a letter? The upper-case equivalent?)</>
</row>
<row>
- <entry>LC_MESSAGES</>
+ <entry><envar>LC_MESSAGES</></>
<entry>Language of messages</>
</row>
<row>
- <entry>LC_MONETARY</>
+ <entry><envar>LC_MONETARY</></>
<entry>Formatting of currency amounts</>
</row>
<row>
- <entry>LC_NUMERIC</>
+ <entry><envar>LC_NUMERIC</></>
<entry>Formatting of numbers</>
</row>
<row>
- <entry>LC_TIME</>
+ <entry><envar>LC_TIME</></>
<entry>Formatting of dates and times</>
</row>
</tbody>
<para>
If locale support doesn't work in spite of the explanation above,
- check that the locale support in your operating system is okay.
+ check that the locale support in your operating system is correctly configured.
To check whether a given locale is installed and functional you
can use <application>Perl</>, for example. Perl has also support
for locales and if a locale is broken <command>perl -v</> will
<para>
Check that your locale files are in the right location. Possible
- locations include: <filename>/usr/lib/locale</filename> (Linux,
- Solaris), <filename>/usr/share/locale</filename> (Linux),
- <filename>/usr/lib/nls/loc</filename> (DUX 4.0). Check the locale
+ locations include: <filename>/usr/lib/locale</filename> (<systemitem class="osname">Linux</>,
+ <systemitem class="osname">Solaris</>), <filename>/usr/share/locale</filename> (<systemitem class="osname">Linux</>),
+ <filename>/usr/lib/nls/loc</filename> (<systemitem class="osname">DUX 4.0</>). Check the locale
man page of your system if you are not sure.
</para>
<para>
Multibyte (<acronym>MB</acronym>) support is intended to allow
<productname>Postgres</productname> to handle
- multiple-byte character sets such as EUC (Extended Unix Code), Unicode and
- Mule internal code. With <acronym>MB</acronym> enabled you can use multi-byte
+ multiple-byte character sets such as <acronym>EUC</> (Extended Unix Code), Unicode and
+ Mule internal code. With <acronym>MB</acronym> enabled you can use multibyte
character sets in regular expressions (regexp), LIKE, and some
other functions. The default
encoding system is selected while initializing your
</thead>
<tbody>
<row>
- <entry>SQL_ASCII</entry>
- <entry>ASCII</entry>
+ <entry><literal>SQL_ASCII</literal></entry>
+ <entry><acronym>ASCII</acronym></entry>
</row>
<row>
- <entry>EUC_JP</entry>
- <entry>Japanese EUC</entry>
+ <entry><literal>EUC_JP</literal></entry>
+ <entry>Japanese <acronym>EUC</></entry>
</row>
<row>
- <entry>EUC_CN</entry>
- <entry>Chinese EUC</entry>
+ <entry><literal>EUC_CN</literal></entry>
+ <entry>Chinese <acronym>EUC</></entry>
</row>
<row>
- <entry>EUC_KR</entry>
- <entry>Korean EUC</entry>
+ <entry><literal>EUC_KR</literal></entry>
+ <entry>Korean <acronym>EUC</></entry>
</row>
<row>
- <entry>EUC_TW</entry>
- <entry>Taiwan EUC</entry>
+ <entry><literal>EUC_TW</literal></entry>
+ <entry>Taiwan <acronym>EUC</acronym></entry>
</row>
<row>
- <entry>UNICODE</entry>
- <entry>Unicode(UTF-8)</entry>
+ <entry><literal>UNICODE</literal></entry>
+ <entry>Unicode (<acronym>UTF</acronym>-8)</entry>
</row>
<row>
- <entry>MULE_INTERNAL</entry>
+ <entry><literal>MULE_INTERNAL</literal></entry>
<entry>Mule internal</entry>
</row>
<row>
- <entry>LATIN1</entry>
+ <entry><literal>LATIN1</literal></entry>
<entry>ISO 8859-1 English and some European languages</entry>
</row>
<row>
- <entry>LATIN2</entry>
+ <entry><literal>LATIN2</literal></entry>
<entry>ISO 8859-2 English and some European languages</entry>
</row>
<row>
- <entry>LATIN3</entry>
+ <entry><literal>LATIN3</literal></entry>
<entry>ISO 8859-3 English and some European languages</entry>
</row>
<row>
- <entry>LATIN4</entry>
+ <entry><literal>LATIN4</literal></entry>
<entry>ISO 8859-4 English and some European languages</entry>
</row>
<row>
- <entry>LATIN5</entry>
+ <entry><literal>LATIN5</literal></entry>
<entry>ISO 8859-5 English and some European languages</entry>
</row>
<row>
- <entry>KOI8</entry>
- <entry>KOI8-R(U)</entry>
+ <entry><literal>KOI8</literal></entry>
+ <entry><acronym>KOI</acronym>8-R(U)</entry>
</row>
<row>
- <entry>WIN</entry>
+ <entry><literal>WIN</literal></entry>
<entry>Windows CP1251</entry>
</row>
<row>
- <entry>ALT</entry>
+ <entry><literal>ALT</literal></entry>
<entry>Windows CP866</entry>
</row>
</tbody>
% initdb -E EUC_JP
</programlisting>
- sets the default encoding to EUC_JP (Extended Unix Code for Japanese).
+ sets the default encoding to <literal>EUC_JP</literal> (Extended Unix Code for Japanese).
Note that you can use "--encoding" instead of "-E" if you prefer
to type longer option strings.
If no -E or --encoding option is given, the encoding
% createdb -E EUC_KR korean
</programlisting>
- will create a database named "korean" with EUC_KR encoding.
+ will create a database named <database>korean</database> with <literal>EUC_KR</literal> encoding.
Another way to accomplish this is to use a SQL command:
<programlisting>
The encoding for a database is represented as an
<firstterm>encoding column</firstterm> in the
<literal>pg_database</literal> system catalog.
- You can see that by using -l or \l of psql
+ You can see that by using <option>-l</option> or <command>\l</command> of <command>psql</command>
command.
<programlisting>
</thead>
<tbody>
<row>
- <entry>EUC_JP</entry>
- <entry>EUC_JP, SJIS</entry>
+ <entry><literal>EUC_JP</literal></entry>
+ <entry><literal>EUC_JP</literal>, <literal>SJIS</literal></entry>
</row>
<row>
- <entry>EUC_TW</entry>
- <entry>EUC_TW, BIG5</entry>
+ <entry><literal>EUC_TW</literal></entry>
+ <entry><literal>EUC_TW</literal>, <literal>BIG5</literal></entry>
</row>
<row>
- <entry>LATIN2</entry>
- <entry>LATIN2, WIN1250</entry>
+ <entry><literal>LATIN2</literal></entry>
+ <entry><literal>LATIN2</literal>, <literal>WIN1250</literal></entry>
</row>
<row>
- <entry>LATIN5</entry>
- <entry>LATIN5, WIN, ALT</entry>
+ <entry><literal>LATIN5</literal></entry>
+ <entry><literal>LATIN5</literal>, <literal>WIN</literal>, <literal>ALT</literal></entry>
</row>
<row>
- <entry>MULE_INTERNAL</entry>
- <entry>EUC_JP, SJIS, EUC_KR, EUC_CN,
- EUC_TW, BIG5, LATIN1 to LATIN5,
- WIN, ALT, WIN1250</entry>
+ <entry><literal>MULE_INTERNAL</literal></entry>
+ <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>,
+ <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>,
+ <literal>WIN</literal>, <literal>ALT</literal>, <literal>WIN1250</literal></entry>
</row>
</tbody>
</tgroup>
<application>psql</application>.
<command>\encoding</command> allows you to change frontend
encoding on the fly. For
- example, to change the encoding to SJIS, type:
+ example, to change the encoding to <literal>SJIS</literal>, type:
<programlisting>
\encoding SJIS
<listitem>
<para>
- Using libpq functions.
+ Using <application>libpq</> functions.
<command>\encoding</command> actually calls
- PQsetClientEncoding() for its purpose.
+ <function>PQsetClientEncoding()</function> for its purpose.
<programlisting>
int PQsetClientEncoding(PGconn *<replaceable>conn</replaceable>, const char *<replaceable>encoding</replaceable>)
</programlisting>
Note that it returns the "encoding id," not the encoding symbol string
- such as "EUC_JP." To convert an encoding id to an encoding symbol, you
+ such as <literal>EUC_JP</literal>. To convert an encoding id to an encoding symbol, you
can use:
<programlisting>
encodings has been supported since PostgreSQL 7.1.
Because this requires huge conversion tables, it's not enabled by default.
To enable this feature, run configure with the
- --enable-unicode-conversion option. Note that this requires
- the --enable-multibyte option also.
+ <option>--enable-unicode-conversion</option> option. Note that this requires
+ the <option>--enable-multibyte</option> option also.
</para>
</sect2>
<title>What happens if the translation is not possible?</title>
<para>
- Suppose you choose EUC_JP for the backend, LATIN1 for the frontend,
- then some Japanese characters could not be translated into LATIN1. In
- this case, a letter that cannot be represented in the LATIN1 character set
+ Suppose you choose <literal>EUC_JP</literal> for the backend, <literal>LATIN1</literal> for the frontend,
+ then some Japanese characters could not be translated into <literal>LATIN1</literal>. In
+ this case, a letter that cannot be represented in the <literal>LATIN1</literal> character set
would be transformed as:
<programlisting>
<para>
<ulink url="ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf">
ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/cjk.inf</ulink>
- Detailed explanations of EUC_JP, EUC_CN, EUC_KR, EUC_TW
+ Detailed explanations of <literal>EUC_JP</literal>, <literal>EUC_CN</literal>, <literal>EUC_KR</literal>, <literal>EUC_TW</literal>
appear in section 3.2.
</para>
</listitem>
<listitem>
<para>
Unicode: <ulink url="http://www.unicode.org/">http://www.unicode.org/</ulink>
- The homepage of UNICODE.
+ The homepage of Unicode.
</para>
</listitem>
<listitem>
<para>
<literal>RFC 2044</literal>
- UTF-8 is defined here.
+ <literal>UTF</literal>-8 is defined here.
</para>
</listitem>
</itemizedlist>
<listitem>
<para>
Success depends on proper system locales. This has been tested
- with RH6.0 and Slackware 3.6, with cs_CZ.iso8859-2 locale.
+ with <systemitem class="osname">Red Hat 6.0</> and <systemitem
+ class="osname">Slackware 3.6</>, with <literal>cs_CZ.iso8859-2</literal> locale.
</para>
</listitem>
<listitem>
<para>
- WIN1250 encoding is useable only for M$W ODBC clients. The
+ WIN1250 encoding is usable only for Windows ODBC clients. The
characters are recoded on the fly, to be displayed and stored
back properly.
</para>
<step>
<para>
- Install ODBC driver for PgSQL on your M$ Windows machine.
+ Install ODBC driver for <productname>PostgreSQL</productname> on your Windows machine.
</para>
</step>
cannot use different encodings on the same host at the same
time. It is also inconvenient when you boot your client hosts into
multiple operating systems. Nevertheless, when these restrictions are
- not limiting and you do not need multi-byte characters than it is a
+ not limiting and you do not need multibyte characters than it is a
simple and effective solution.
</para>
</sect1>
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.18 2001/09/06 03:23:38 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/client-auth.sgml,v 1.19 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="client-authentication">
<title>Client Authentication</title>
the server's machine, it makes sense to assign database user names
that match their Unix user ids. However, a server that accepts remote
connections may have many users who have no local account, and in such
- cases there need be no connection between database usernames and Unix
- usernames.
+ cases there need be no connection between database user names and Unix
+ user names.
</para>
<sect1 id="pg-hba.conf">
<para>
Client authentication is controlled by the file
- <filename>pg_hba.conf</filename> in the $PGDATA directory, e.g.,
- <filename>/usr/local/pgsql/data/pg_hba.conf</filename>. (HBA stands
+ <filename>pg_hba.conf</filename> in the data directory, e.g.,
+ <filename>/usr/local/pgsql/data/pg_hba.conf</filename>. (<acronym>HBA</> stands
for host-based authentication.) A default <filename>pg_hba.conf</filename>
file is installed when the
data area is initialized by <application>initdb</application>.
<variablelist>
<varlistentry>
- <term>trust</>
+ <term><literal>trust</></term>
<listitem>
<para>
The connection is allowed unconditionally. This method allows
</varlistentry>
<varlistentry>
- <term>reject</>
+ <term><literal>reject</></term>
<listitem>
<para>
The connection is rejected unconditionally. This is mostly
</varlistentry>
<varlistentry>
- <term>password</>
+ <term><literal>password</></term>
<listitem>
<para>
The client is required to supply a password with the connection
</varlistentry>
<varlistentry>
- <term>md5</>
+ <term><literal>md5</></term>
<listitem>
<para>
Like the <literal>password</literal> method, but the password
</varlistentry>
<varlistentry>
- <term>crypt</>
+ <term><literal>crypt</></term>
<listitem>
<para>
Like the <literal>md5</literal> method but uses older crypt
</varlistentry>
<varlistentry>
- <term>krb4</>
+ <term><literal>krb4</></term>
<listitem>
<para>
Kerberos V4 is used to authenticate the user. This is only
</varlistentry>
<varlistentry>
- <term>krb5</term>
+ <term><literal>krb5</></term>
<listitem>
<para>
Kerberos V5 is used to authenticate the user. This is only
</varlistentry>
<varlistentry>
- <term>ident</term>
+ <term><literal>ident</></term>
<listitem>
<para>
The identity of the user as determined on login to the
server; ident authentication should never be used for remote hosts
whose administrators are not trustworthy.)
On operating systems
- supporting SO_PEERCRED requests for Unix domain sockets,
+ supporting <symbol>SO_PEERCRED</> requests for Unix domain sockets,
ident authentication is possible for local connections;
the system is then asked for the connecting user's identity.
</para>
<para>
- On systems without SO_PEERCRED requests, ident authentication
+ On systems without <symbol>SO_PEERCRED</> requests, ident authentication
is only available for TCP/IP connections. As a workaround,
it is possible to
- specify the localhost address 127.0.0.1 and make connections
+ specify the <systemitem class="systemname">localhost</> address
+ <systemitem class="systemname">127.0.0.1</> and make connections
to this address.
</para>
<para>
</varlistentry>
<varlistentry>
- <term>pam</term>
+ <term><literal>pam</></term>
<listitem>
<para>
This authentication type operates similar to
authentication mechanism. The <replaceable>authentication
option</replaceable> following the <literal>pam</> keyword
specifies the service name that will be passed to PAM. The
- default service name is <firstterm>postgresql</firstterm>.
- For more information about PAM, please read <ulink
- url="http://www.kernel.org/pub/linux/libs/pam/">Linux-PAM
- Page</ulink> and <ulink
- url="http://www.sun.com/software/solaris/pam/">Solaris-PAM
+ default service name is <literal>postgresql</literal>.
+ For more information about PAM, please read the <ulink
+ url="http://www.kernel.org/pub/linux/libs/pam/"><productname>Linux-PAM</productname>
+ Page</ulink> and/or the <ulink
+ url="http://www.sun.com/software/solaris/pam/"><systemitem class="osname">Solaris</> PAM
Page</ulink>.
</para>
</listitem>
</varlistentry>
</variablelist>
- The first record that matches a connection attempt's client IP address
- and requested database name is used to do the authentication step.
- There is no <quote>fall-through</> or <quote>backup</>: if
- one record is chosen and the
- authentication fails, the following records are not considered. If
- no record matches, the access will be denied.
+ The first record that matches the client IP address and requested
+ database name of a connection attempt is used to do the
+ authentication step. There is no <quote>fall-through</> or
+ <quote>backup</>: if one record is chosen and the authentication
+ fails, the following records are not considered. If no record
+ matches, the access will be denied.
</para>
<para>
The <filename>pg_hba.conf</filename> file is loaded only on startup
- and when the <application>postmaster</> receives a SIGHUP signal. If
+ and when the <application>postmaster</> receives a <systemitem>SIGHUP</systemitem> signal. If
you edit the file on an active system, you will need to issue a
- SIGHUP to the <application>postmaster</> using <application>kill</>
+ <systemitem>SIGHUP</systemitem> to the <application>postmaster</> using <application>kill</>
to make it re-read the file.
</para>
<prompt>kadmin% </><userinput>ank -randkey postgres/server.my.domain.org</>
<prompt>kadmin% </><userinput>ktadd -k krb5.keytab postgres/server.my.domain.org</>
</screen>
- Read the <productname>Kerberos</> documentation for defails.
+ Read the <productname>Kerberos</> documentation for details.
</para>
<para>
<listitem>
<para>
The <productname>Postgres</> service is assumed to be have two
- components, the service name and a hostname, canonicalized as
+ components, the service name and a host name, canonicalized as
in Version 4 (i.e., with all domain suffixes removed).
</para>
</listitem>
</para>
<para>
- If you use mod_auth_krb and mod_perl on your Apache web server,
- you can use AuthType KerberosV5SaveCredentials with a mod_perl
+ If you use <application>mod_auth_krb</application> and <application>mod_perl</application> on your <productname>Apache</productname> web server,
+ you can use <literal>AuthType KerberosV5SaveCredentials</literal> with a <application>mod_perl</application>
script. This gives secure database access over the web, no extra
passwords required.
</para>
</para>
<para>
- On systems supporting SO_PEERCRED requests for Unix-domain sockets,
+ On systems supporting <symbol>SO_PEERCRED</symbol> requests for Unix-domain sockets,
ident authentication can also be applied to local connections. In this
case, no security risk is added by using ident authentication; indeed
it is a preferable choice for such a system.
linkend="example-pg-hba.conf"> is shown in <xref
linkend="example-pg-ident.conf">. In this example setup, anyone
logged in to a machine on the 192.168 network that does not have
- the Unix user name bryanh, ann, or robert would not be granted access.
- Unix user robert would only be allowed access when he tries to
- connect as Postgres user <quote>bob</quote>, not as <quote>robert</quote>
- or anyone else. <quote>ann</quote> would only be allowed to connect as
- <quote>ann</>. User bryanh would be allowed to connect as either
- <quote>bryanh</> himself or as <quote>guest1</>.
+ the Unix user name <systemitem>bryanh</>, <systemitem>ann</>, or <systemitem>robert</> would not be granted access.
+ Unix user <systemitem>robert</> would only be allowed access when he tries to
+ connect as Postgres user <systemitem>bob</>, not as <systemitem>robert</>
+ or anyone else. <systemitem>ann</> would only be allowed to connect as
+ <systemitem>ann</>. User <systemitem>bryanh</> would be allowed to connect as either
+ <systemitem>bryanh</> himself or as <systemitem>guest1</>.
</para>
<example id="example-pg-ident.conf">
</para>
<para>
- Note that the postmaster's stderr log may contain more information
+ Note that the server log may contain more information
about an authentication failure than is reported to the client.
If you are confused about the reason for a failure, check the log.
</para>
Windows. The makefiles included in the source distribution are
written for <productname>Microsoft Visual C++</productname> and will
probably not work with other systems. It should be possible to
- compile the libaries manually in other cases.
+ compile the libraries manually in other cases.
</para>
<tip>
</para>
<para>
- If you plan to do development using libpq on this machine, you will
+ If you plan to do development using <application>libpq</application> on this machine, you will
have to add the <filename>src\include</filename> and
<filename>src\interfaces\libpq</filename> subdirectories of the
source tree to the include path in your compilers settings.
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.52 2001/09/06 02:56:32 momjian Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/installation.sgml,v 1.53 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="installation">
<title><![%flattext-install-include[<productname>PostgreSQL</>]]>
<application>make</> programs will <emphasis>not</> work.
<acronym>GNU</> <application>make</> is often installed under
the name <filename>gmake</filename>; this document will always
- refer to it by that name. (On GNU/Linux systems GNU make is the
+ refer to it by that name. (On <systemitem class="osname">GNU/Linux</> systems GNU make is the
default tool with the name <filename>make</>.) To test for
<acronym>GNU</acronym> <application>make</application> enter
<screen>
need these programs only when building from a CVS tree or when
the actual scanner and parser definition files were changed. If
you need them, be sure to get <application>Flex</> 2.5.4 or
- later and <application>Bison</> 1.28 or later. Other yacc
+ later and <application>Bison</> 1.28 or later. Other <application>yacc</>
programs can sometimes be used, but doing so requires extra
- efforts and is not recommended. Other lex programs will
+ efforts and is not recommended. Other <application>lex</> programs will
definitely not work.
</para>
</listitem>
<para>
On systems that have <productname>PostgreSQL</> started at boot time, there is
probably a start-up file that will accomplish the same thing. For
- example, on a Red Hat Linux system one might find that
+ example, on a <systemitem class="osname">Red Hat Linux</> system one might find that
<screen>
<userinput>/etc/rc.d/init.d/postgresql stop</userinput>
</screen>
<variablelist>
<varlistentry>
- <term>--prefix=<replaceable>PREFIX</></term>
+ <term><option>--prefix=<replaceable>PREFIX</></option></term>
<listitem>
<para>
Install all files under the directory <replaceable>PREFIX</>
</varlistentry>
<varlistentry>
- <term>--exec-prefix=<replaceable>EXEC-PREFIX</></term>
+ <term><option>--exec-prefix=<replaceable>EXEC-PREFIX</></option></term>
<listitem>
<para>
You can install architecture-dependent files under a
</varlistentry>
<varlistentry>
- <term>--bindir=<replaceable>DIRECTORY</></term>
+ <term><option>--bindir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Specifies the directory for executable programs. The default
</varlistentry>
<varlistentry>
- <term>--datadir=<replaceable>DIRECTORY</></term>
+ <term><option>--datadir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Sets the directory for read-only data files used by the
</varlistentry>
<varlistentry>
- <term>--sysconfdir=<replaceable>DIRECTORY</></term>
+ <term><option>--sysconfdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The directory for various configuration files,
</varlistentry>
<varlistentry>
- <term>--libdir=<replaceable>DIRECTORY</></term>
+ <term><option>--libdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The location to install libraries and dynamically loadable
</varlistentry>
<varlistentry>
- <term>--includedir=<replaceable>DIRECTORY</></term>
+ <term><option>--includedir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The directory for installing C and C++ header files. The
</varlistentry>
<varlistentry>
- <term>--docdir=<replaceable>DIRECTORY</></term>
+ <term><option>--docdir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Documentation files, except <quote>man</> pages, will be
</varlistentry>
<varlistentry>
- <term>--mandir=<replaceable>DIRECTORY</></term>
+ <term><option>--mandir=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
The man pages that come with <productname>PostgreSQL</> will be installed under
automatically appended to <varname>datadir</varname>,
<varname>sysconfdir</varname>, and <varname>docdir</varname>,
unless the fully expanded directory name already contains the
- string <quote>postgres</quote> or <quote>pgsql</quote>. For
+ string <quote><literal>postgres</></quote> or <quote><literal>pgsql</></quote>. For
example, if you choose <filename>/usr/local</filename> as
prefix, the documentation will be installed in
<filename>/usr/local/doc/postgresql</filename>, but if the
<para>
<variablelist>
<varlistentry>
- <term>--with-includes=<replaceable>DIRECTORIES</></term>
+ <term><option>--with-includes=<replaceable>DIRECTORIES</></option></term>
<listitem>
<para>
<replaceable>DIRECTORIES</> is a colon-separated list of
directories that will be added to the list the compiler
searches for header files. If you have optional packages
- (such as GNU Readline) installed in a non-standard location
+ (such as GNU <application>Readline</>) installed in a non-standard location
you have to use this option and probably the corresponding
<option>--with-libraries</> option.
</para>
</varlistentry>
<varlistentry>
- <term>--with-libraries=<replaceable>DIRECTORIES</></term>
+ <term><option>--with-libraries=<replaceable>DIRECTORIES</></option></term>
<listitem>
<para>
<replaceable>DIRECTORIES</> is a colon-separated list of
</varlistentry>
<varlistentry>
- <term>--enable-locale</term>
+ <term><option>--enable-locale</option></term>
<listitem>
<para>
Enables locale support. There is a performance penalty
</varlistentry>
<varlistentry>
- <term>--enable-recode</term>
+ <term><option>--enable-recode</option></term>
<listitem>
<para>
Enables single-byte character set recode support. See
</varlistentry>
<varlistentry>
- <term>--enable-multibyte</term>
+ <term><option>--enable-multibyte</option></term>
<listitem>
<para>
Allows the use of multibyte character encodings. This is
</varlistentry>
<varlistentry>
- <term>--enable-nls<optional>=<replaceable>LANGUAGES</replaceable></optional></term>
+ <term><option>--enable-nls<optional>=<replaceable>LANGUAGES</replaceable></optional></option></term>
<listitem>
<para>
- Enables Native Language Support (NLS), that is, the ability
+ Enables Native Language Support (<acronym>NLS</acronym>), that is, the ability
to display a program's message in a language other than
English. <replaceable>LANGUAGES</replaceable> is a space
separated list of codes of the languages that you want
<para>
To use this option, you will need an implementation of the
- gettext API. Some operating systems have this built-in
- (e.g., Linux, NetBSD, Solaris), for other systems you can download
+ <application>gettext</> API. Some operating systems have this built-in
+ (e.g., <systemitem class="osname">Linux</>, <systemitem class="osname">NetBSD</>, <systemitem class="osname">Solaris</>), for other systems you can download
an add-on package from here: <ulink
url="http://www.postgresql.org/~petere/gettext.html"
- >http://www.postgresql.org/~petere/gettext.html</ulink>. If
- you are using the gettext implementation in the GNU C library
- then you will additionally need the GNU gettext package for
+ ><systemitem class="resource">http://www.postgresql.org/~petere/gettext.html</></ulink>. If
+ you are using the <application>gettext</> implementation in the GNU C library
+ then you will additionally need the <productname>GNU gettext</productname> package for
some utility programs. For any of the other implementations
you will not need it.
</para>
</varlistentry>
<varlistentry>
- <term>--with-pgport=<replaceable>NUMBER</></term>
+ <term><option>--with-pgport=<replaceable>NUMBER</></option></term>
<listitem>
<para>
Set <replaceable>NUMBER</> as the default port number for
</varlistentry>
<varlistentry>
- <term>--with-CXX</term>
+ <term><option>--with-CXX</option></term>
<listitem>
<para>
Build the C++ interface library.
</varlistentry>
<varlistentry>
- <term>--with-perl</term>
+ <term><option>--with-perl</option></term>
<listitem>
<para>
Build the Perl interface module. The Perl interface
</varlistentry>
<varlistentry>
- <term>--with-python</term>
+ <term><option>--with-python</option></term>
<listitem>
<para>
Build the Python interface module. You need to have root
</varlistentry>
<varlistentry>
- <term>--with-tcl</term>
+ <term><option>--with-tcl</option></term>
<listitem>
<para>
- Builds components that require Tcl/Tk, which are libpgtcl,
- pgtclsh, pgtksh, pgaccess, and PL/Tcl. But see below about
+ Builds components that require Tcl/Tk, which are
+ <application>libpgtcl</>, <application>pgtclsh</>,
+ <application>pgtksh</application>, <application>PgAccess</>,
+ and <application>PL/Tcl</>. But see below about
<option>--without-tk</>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--without-tk</term>
+ <term><option>--without-tk</option></term>
<listitem>
<para>
If you specify <option>--with-tcl</> and this option, then
- programs that require <productname>Tk</> (i.e., pgtksh and pgaccess)
- will be excluded.
+ programs that require <productname>Tk</>
+ (<application>pgtksh</> and <application>PgAccess</>) will be
+ excluded.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>--with-tclconfig=<replaceable>DIRECTORY</replaceable></term>
- <term>--with-tkconfig=<replaceable>DIRECTORY</replaceable></term>
+ <term><option>--with-tclconfig=<replaceable>DIRECTORY</replaceable></option></term>
+ <term><option>--with-tkconfig=<replaceable>DIRECTORY</replaceable></option></term>
<listitem>
<para>
Tcl/Tk installs the files <filename>tclConfig.sh</filename> and
</varlistentry>
<varlistentry>
- <term>--enable-pltcl-unknown</term>
+ <term><option>--enable-pltcl-unknown</option></term>
<listitem>
<para>
Enables enables PL/Tcl unknown support.
</varlistentry>
<varlistentry>
- <term>--enable-pltcl-utf</term>
+ <term><option>--enable-pltcl-utf</option></term>
<listitem>
<para>
- Enables enables PL/Tcl Tcl_UtfToExternal and Tcl_ExternalToUtf
+ Enables enables PL/Tcl <function>Tcl_UtfToExternal</> and <function>Tcl_ExternalToUtf</>
conversion support. These functions needed for Tcl versions 8.1
and above for proper handling of 8-bit characters.
</para>
</varlistentry>
<varlistentry>
- <term>--enable-odbc</term>
+ <term><option>--enable-odbc</option></term>
<listitem>
<para>
Build the ODBC driver package.
</varlistentry>
<varlistentry>
- <term>--with-odbcinst=<replaceable>DIRECTORY</></term>
+ <term><option>--with-odbcinst=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Specifies the directory where the ODBC driver will expect its
</varlistentry>
<varlistentry>
- <term>--with-krb4=<replaceable>DIRECTORY</></term>
- <term>--with-krb5=<replaceable>DIRECTORY</></term>
+ <term><option>--with-krb4=<replaceable>DIRECTORY</></option></term>
+ <term><option>--with-krb5=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Build with support for Kerberos authentication. You can use
</varlistentry>
<varlistentry>
- <term>--with-krb-srvnam=<replaceable>NAME</></term>
+ <term><option>--with-krb-srvnam=<replaceable>NAME</></option></term>
<listitem>
<para>
The name of the Kerberos service principal.
- <quote>postgres</quote> is the default. There's probably no
+ <literal>postgres</literal> is the default. There's probably no
reason to change this.
</para>
</listitem>
<seealso>SSL</seealso>
</indexterm>
- <term>--with-openssl=<replaceable>DIRECTORY</></term>
+ <term><option>--with-openssl=<replaceable>DIRECTORY</></option></term>
<listitem>
<para>
Build with support for <acronym>SSL</> (encrypted) connections.
</varlistentry>
<varlistentry>
- <term>--with-java</term>
+ <term><option>--with-java</option></term>
<listitem>
<para>
Build the <acronym>JDBC</acronym> driver and associated Java
</varlistentry>
<varlistentry>
- <term>--enable-syslog</term>
+ <term><option>--enable-syslog</option></term>
<listitem>
<para>
Enables the <productname>PostgreSQL</> server to use the
- syslog logging facility. (Using this option does not mean
- that you must log with syslog or even that it will be done
+ <systemitem>syslog</> logging facility. (Using this option does not mean
+ that you must log with <systemitem>syslog</> or even that it will be done
by default, it simply makes it possible to turn this option
on at run time.)
</para>
</varlistentry>
<varlistentry>
- <term>--enable-debug</term>
+ <term><option>--enable-debug</option></term>
<listitem>
<para>
Compiles all programs and libraries with debugging symbols.
This means that you can run the programs through a debugger
to analyze problems. This enlarges the size of the installed
- executables considerably, and on non-gcc compilers it usually
+ executables considerably, and on non-GCC compilers it usually
also disables compiler optimization, causing slowdowns. However,
having the symbols available is extremely helpful for dealing
with any problems that may arise. Currently, this option is
</varlistentry>
<varlistentry>
- <term>--enable-cassert</term>
+ <term><option>--enable-cassert</option></term>
<listitem>
<para>
Enables <firstterm>assertion</> checks in the server, which test for
<para>
The standard install installs only the header files needed for client
application development. If you plan to do any server-side program
- development (such as custom functions or datatypes written in C),
+ development (such as custom functions or data types written in C),
then you may want to install the entire <productname>PostgreSQL</>
include tree into your target include directory. To do that, enter
<screen>
On some systems that have shared libraries (which most systems do)
you need to tell your system how to find the newly installed
shared libraries. The systems on which this is
- <emphasis>not</emphasis> necessary include FreeBSD, HP/UX, Irix,
- Linux, NetBSD, OpenBSD, OSF/1 (Digital Unix, Tru64 UNIX), and
- Solaris.
+ <emphasis>not</emphasis> necessary include <systemitem
+ class="osname">BSD/OS</>, <systemitem class="osname">FreeBSD</>,
+ <systemitem class="osname">HP-UX</>, <systemitem
+ class="osname">IRIX</>, <systemitem class="osname">Linux</>,
+ <systemitem class="osname">NetBSD</>, <systemitem
+ class="osname">OpenBSD</>, <systemitem class="osname">Tru64
+ UNIX</> (formerly <systemitem class="osname">Digital UNIX</>), and
+ <systemitem class="osname">Solaris</>.
</para>
<para>
The method to set the shared library search path varies between
platforms, but the most widely usable method is to set the
environment variable <envar>LD_LIBRARY_PATH</> like so: In Bourne
- shells (sh, ksh, bash, zsh)
+ shells (<command>sh</>, <command>ksh</>, <command>bash</>, <command>zsh</>)
<programlisting>
LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
</programlisting>
- or in csh or tcsh
+ or in <command>csh</> or <command>tcsh</>
<programlisting>
setenv LD_LIBRARY_PATH /usr/local/pgsql/lib
</programlisting>
<programlisting>
PATH=$PATH:/usr/local/pgsql/bin
</programlisting>
- If you are using csh or tcsh, then use this command:
+ If you are using <command>csh</> or <command>tcsh</>, then use this command:
<programlisting>
set path = ( /usr/local/pgsql/bin $path )
</programlisting>
</thead>
<tbody>
<row>
- <entry>AIX 4.3.3</entry>
- <entry>RS6000</entry>
+ <entry><systemitem class="osname">AIX 4.3.3</></entry>
+ <entry><systemitem>RS6000</></entry>
<entry>7.1</entry>
<entry>2001-03-21, Gilles Darold (<email>gilles@darold.net</email>)</entry>
<entry>see also <filename>doc/FAQ_AIX</filename></entry>
</row>
<row>
- <entry>BeOS 5.0.4</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">BeOS 5.0.4</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-02-26, Cyril Velter (<email>cyril.velter@libertysurf.fr</email>)</entry>
<entry>requires new BONE networking stack</entry>
</row>
<row>
- <entry>BSD/OS 4.01</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">BSD/OS 4.01</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-20, Bruce Momjian (<email>pgman@candle.pha.pa.us</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Compaq Tru64 UNIX</entry>
- <entry>Alpha</entry>
- <entry>7.1</entry>
- <entry>2001-03-26, Adriaan Joubert (<email>a.joubert@albourne.com</email>)</entry>
- <entry>4.0-5.0, cc and gcc</entry>
- </row>
- <row>
- <entry>FreeBSD 4.3</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">FreeBSD 4.3</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-19, Vince Vielhaber (<email>vev@hub.org</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>HP/UX</entry>
- <entry>PA-RISC</entry>
+ <entry><systemitem class="osname">HP-UX</></entry>
+ <entry><systemitem>PA-RISC</></entry>
<entry>7.1</entry>
<entry>2001-03-19, 10.20 Tom Lane (<email>tgl@sss.pgh.pa.us</email>),
2001-03-22, 11.00, 11i Giles Lean (<email>giles@nemeton.com.au</email>)</entry>
<entry>32- and 64-bit on 11.00; see also <filename>doc/FAQ_HPUX</filename></entry>
</row>
<row>
- <entry>IRIX 6.5.11</entry>
- <entry>MIPS</entry>
+ <entry><systemitem class="osname">IRIX 6.5.11</></entry>
+ <entry><systemitem>MIPS</></entry>
<entry>7.1</entry>
<entry>2001-03-22, Robert Bruccoleri (<email>bruc@acm.org</email>)</entry>
<entry>32-bit compilation model</entry>
</row>
<row>
- <entry>Linux 2.2.x</entry>
- <entry>Alpha</entry>
+ <entry><systemitem class="osname">Linux 2.2.x</></entry>
+ <entry><systemitem>Alpha</></entry>
<entry>7.1</entry>
<entry>2001-01-23, Ryan Kirkpatrick (<email>pgsql@rkirkpat.net</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Linux 2.2.x</entry>
- <entry>armv4l</entry>
+ <entry><systemitem class="osname">Linux 2.2.x</></entry>
+ <entry><systemitem>armv4l</></entry>
<entry>7.1</entry>
<entry>2001-02-22, Mark Knox (<email>segfault@hardline.org</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Linux 2.0.x</entry>
- <entry>MIPS</entry>
+ <entry><systemitem class="osname">Linux 2.0.x</></entry>
+ <entry><systemitem>MIPS</></entry>
<entry>7.1</entry>
<entry>2001-03-30, Dominic Eidson (<email>sauron@the-infinite.org</email>)</entry>
- <entry>Cobalt Qube</entry>
+ <entry><productname>Cobalt Qube</></entry>
</row>
<row>
- <entry>Linux 2.2.18</entry>
- <entry>PPC74xx</entry>
+ <entry><systemitem class="osname">Linux 2.2.18</></entry>
+ <entry><systemitem>PPC74xx</></entry>
<entry>7.1</entry>
<entry>2001-03-19, Tom Lane (<email>tgl@sss.pgh.pa.us</email>)</entry>
<entry>Apple G3</entry>
</row>
<row>
- <entry>Linux</entry>
- <entry>S/390</entry>
+ <entry><systemitem class="osname">Linux</></entry>
+ <entry><systemitem>S/390</></entry>
<entry>7.1</entry>
<entry>2000-11-17, Neale Ferguson (<email>Neale.Ferguson@softwareAG-usa.com</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Linux 2.2.15</entry>
- <entry>Sparc</entry>
+ <entry><systemitem class="osname">Linux 2.2.15</></entry>
+ <entry><systemitem>Sparc</></entry>
<entry>7.1</entry>
<entry>2001-01-30, Ryan Kirkpatrick (<email>pgsql@rkirkpat.net</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Linux</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">Linux</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-19, Thomas Lockhart (<email>thomas@fourpalms.org</email>)</entry>
<entry>2.0.x, 2.2.x, 2.4.2</entry>
</row>
<row>
- <entry>MacOS X</entry>
- <entry>PPC</entry>
+ <entry><systemitem class="osname">MacOS X</></entry>
+ <entry><systemitem>PPC</></entry>
<entry>7.1</entry>
<entry>2000-12-11, Peter Bierman (<email>bierman@apple.com</email>),
2000-12-11, Daniel Luke (<email>dluke@geeklair.net</email>)</entry>
<entry>Darwin (only) Beta-2 or higher</entry>
</row>
<row>
- <entry>NetBSD 1.5</entry>
- <entry>Alpha</entry>
+ <entry><systemitem class="osname">NetBSD 1.5</></entry>
+ <entry><systemitem>Alpha</></entry>
<entry>7.1</entry>
<entry>2001-03-22, Giles Lean (<email>giles@nemeton.com.au</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>NetBSD 1.5E</entry>
- <entry>arm32</entry>
+ <entry><systemitem class="osname">NetBSD 1.5E</></entry>
+ <entry><systemitem>arm32</></entry>
<entry>7.1</entry>
<entry>2001-03-21, Patrick Welche (<email>prlw1@cam.ac.uk</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>NetBSD</entry>
- <entry>m68k</entry>
+ <entry><systemitem class="osname">NetBSD</></entry>
+ <entry><systemitem>m68k</></entry>
<entry>7.0</entry>
<entry>2000-04-10, Henry B. Hotz (<email>hotz@jpl.nasa.gov</email>)</entry>
<entry>Mac 8xx</entry>
</row>
<row>
- <entry>NetBSD</entry>
- <entry>PPC</entry>
+ <entry><systemitem class="osname">NetBSD</></entry>
+ <entry><systemitem>PPC</></entry>
<entry>7.1</entry>
<entry>2001-04-05, Henry B. Hotz (<email>hotz@jpl.nasa.gov</email>)</entry>
<entry>Mac G4</entry>
</row>
<row>
- <entry>NetBSD</entry>
- <entry>Sparc</entry>
+ <entry><systemitem class="osname">NetBSD</></entry>
+ <entry><systemitem>Sparc</></entry>
<entry>7.1</entry>
<entry>2000-04-05, Matthew Green (<email>mrg@eterna.com.au</email>)</entry>
<entry>32- and 64-bit builds</entry>
</row>
<row>
- <entry>NetBSD 1.5</entry>
- <entry>VAX</entry>
+ <entry><systemitem class="osname">NetBSD 1.5</></entry>
+ <entry><systemitem>VAX</></entry>
<entry>7.1</entry>
<entry>2001-03-30, Tom I. Helbekkmo (<email>tih@kpnQwest.no</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>NetBSD 1.5</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">NetBSD 1.5</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-23, Giles Lean (<email>giles@nemeton.com.au</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>OpenBSD 2.8</entry>
- <entry>Sparc</entry>
+ <entry><systemitem class="osname">OpenBSD 2.8</></entry>
+ <entry><systemitem>Sparc</></entry>
<entry>7.1</entry>
<entry>2001-03-23, Brandon Palmer (<email>bpalmer@crimelabs.net</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>OpenBSD 2.8</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">OpenBSD 2.8</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-21, Brandon Palmer (<email>bpalmer@crimelabs.net</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>SCO UnixWare 7.1.1</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">SCO UnixWare 7.1.1</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-19, Larry Rosenman (<email>ler@lerctr.org</email>)</entry>
- <entry>UDK FS compiler; see also <filename>doc/FAQ_SCO</filename></entry>
+ <entry><productname>UDK FS</productname> compiler; see also <filename>doc/FAQ_SCO</filename></entry>
</row>
<row>
- <entry>Solaris 2.7-8</entry>
- <entry>Sparc</entry>
+ <entry><systemitem class="osname">Solaris 2.7-8</></entry>
+ <entry><systemitem>Sparc</></entry>
<entry>7.1</entry>
<entry>2001-03-22, Marc Fournier (<email>scrappy@hub.org</email>),
2001-03-25, Justin Clift (<email>justin@postgresql.org</email>)</entry>
<entry>see also <filename>doc/FAQ_Solaris</filename></entry>
</row>
<row>
- <entry>Solaris 2.8</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">Solaris 2.8</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-27, Mathijs Brands (<email>mathijs@ilse.nl</email>)</entry>
<entry>see also <filename>doc/FAQ_Solaris</filename></entry>
</row>
<row>
- <entry>SunOS 4.1.4</entry>
- <entry>Sparc</entry>
+ <entry><systemitem class="osname">SunOS 4.1.4</></entry>
+ <entry><systemitem>Sparc</></entry>
<entry>7.1</entry>
<entry>2001-03-23, Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>)</entry>
<entry></entry>
</row>
<row>
- <entry>Windows NT/2000 with Cygwin</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">Tru64 UNIX</></entry>
+ <entry><systemitem>Alpha</></entry>
+ <entry>7.1</entry>
+ <entry>2001-03-26, Adriaan Joubert (<email>a.joubert@albourne.com</email>)</entry>
+ <entry>4.0-5.0, <command>cc</> and <command>gcc</></entry>
+ </row>
+ <row>
+ <entry><systemitem class="osname">Windows NT/2000</> with <application>Cygwin</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-16, Jason Tishler (<email>Jason.Tishler@dothill.com</email>)</entry>
- <entry>with <application>Cygwin</application> toolset, see <filename>doc/FAQ_MSWIN</filename></entry>
+ <entry>with <application>Cygwin</application> tool set, see <filename>doc/FAQ_MSWIN</filename></entry>
</row>
</tbody>
</tgroup>
<tbody>
<row>
- <entry>DGUX 5.4R4.11</entry>
- <entry>m88k</entry>
+ <entry><systemitem class="osname">DGUX 5.4R4.11</></entry>
+ <entry><systemitem>m88k</></entry>
<entry>6.3</entry>
<entry>1998-03-01, Brian E Gallew (<email>geek+@cmu.edu</email>)</entry>
<entry>6.4 probably OK</entry>
</row>
<row>
- <entry>MkLinux DR1</entry>
- <entry>PPC750</entry>
+ <entry><systemitem class="osname">MkLinux DR1</></entry>
+ <entry><systemitem>PPC750</></entry>
<entry>7.0</entry>
<entry>2001-04-03, Tatsuo Ishii (<email>t-ishii@sra.co.jp</email>)</entry>
<entry>7.1 needs OS update?</entry>
</row>
<row>
- <entry>NextStep</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">NextStep</></entry>
+ <entry><systemitem>x86</></entry>
<entry>6.x</entry>
<entry>1998-03-01, David Wetzel (<email>dave@turbocat.de</email>)</entry>
<entry>bit rot suspected</entry>
</row>
<row>
- <entry>QNX 4.25</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">QNX 4.25</></entry>
+ <entry><systemitem>x86</></entry>
<entry>7.0</entry>
<entry>2000-04-01, Dr. Andreas Kardos (<email>kardos@repas-aeg.de</email>)</entry>
<entry>Spinlock code needs work. See also <filename>doc/FAQ_QNX4</filename>.</entry>
</row>
<row>
- <entry>SCO OpenServer 5</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">SCO OpenServer 5</></entry>
+ <entry><systemitem>x86</></entry>
<entry>6.5</entry>
<entry>1999-05-25, Andrew Merrill (<email>andrew@compclass.com</>)</entry>
<entry>7.1 should work, but no reports; see also <filename>doc/FAQ_SCO</filename></entry>
</row>
<row>
- <entry>System V R4</entry>
- <entry>m88k</entry>
+ <entry><systemitem class="osname">System V R4</></entry>
+ <entry><systemitem>m88k</></entry>
<entry>6.2.1</entry>
<entry>1998-03-01, Doug Winterburn (<email>dlw@seavme.xroads.com</email>)</entry>
- <entry>needs new TAS spinlock code</entry>
+ <entry>needs new <acronym>TAS</acronym> spinlock code</entry>
</row>
<row>
- <entry>System V R4</entry>
- <entry>MIPS</entry>
+ <entry><systemitem class="osname">System V R4</></entry>
+ <entry><systemitem>MIPS</></entry>
<entry>6.4</entry>
<entry>1998-10-28, Frank Ridderbusch (<email>ridderbusch.pad@sni.de</email>)</entry>
<entry>no 64-bit integer</entry>
</row>
<row>
- <entry>Ultrix</entry>
- <entry>MIPS</entry>
+ <entry><systemitem class="osname">Ultrix</></entry>
+ <entry><systemitem>MIPS</></entry>
<entry>7.1</entry>
<entry>2001-03-26</entry>
- <entry>TAS spinlock code not detected</entry>
+ <entry><acronym>TAS</acronym> spinlock code not detected</entry>
</row>
<row>
- <entry>Ultrix</entry>
- <entry>VAX</entry>
+ <entry><systemitem class="osname">Ultrix</></entry>
+ <entry><systemitem>VAX</></entry>
<entry>6.x</entry>
<entry>1998-03-01</entry>
<entry>No recent reports. Obsolete?</entry>
</row>
<row>
- <entry>Windows 9x, ME, NT, 2000 (native)</entry>
- <entry>x86</entry>
+ <entry><systemitem class="osname">Windows 9x, ME, NT, 2000</> (native)</entry>
+ <entry><systemitem>x86</></entry>
<entry>7.1</entry>
<entry>2001-03-26, Magnus Hagander (<email>mha@sollentuna.net</email>)</entry>
<entry>
- client-side libraries (libpq and psql) or ODBC/JDBC, no server-side;
+ client-side libraries (<application>libpq</> and <application>psql</>) or ODBC/JDBC, no server-side;
<![%flattext-install-include[see Administrator's Guide]]>
<![%flattext-install-ignore[see <xref linkend="install-win32">]]>
for instructions
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.3 2001/09/09 23:52:12 petere Exp $
-->
<chapter id="maintenance">
In normal <productname>PostgreSQL</productname> operation, an UPDATE or
DELETE of a row does not immediately remove the old <firstterm>tuple</>
(version of the row). This approach is necessary to gain the benefits
- of multi-version concurrency control (see the User's Guide): the tuple
+ of multiversion concurrency control (see the User's Guide): the tuple
must not be deleted while
it is still potentially visible to other transactions. But eventually,
an outdated or deleted tuple is no longer of interest to any transaction.
<para>
Clearly, a table that receives frequent updates or deletes will need
to be vacuumed more often than tables that are seldom updated. It may
- be useful to set up periodic cron tasks that vacuum only selected tables,
+ be useful to set up periodic <application>cron</> tasks that vacuum only selected tables,
skipping tables that are known not to change often. This is only likely
to be helpful if you have both large heavily-updated tables and large
seldom-updated tables --- the extra cost of vacuuming a small table
statistics updates if the statistical distribution of the data is not
changing much. A simple rule of thumb is to think about how much
the minimum and maximum values of the columns in the table change.
- For example, a timestamp column that contains the time of row update
+ For example, a <type>timestamp</type> column that contains the time of row update
will have a constantly-increasing maximum value as rows are added and
updated; such a column will probably need more frequent statistics
updates than, say, a column containing URLs for pages accessed on a
<para>
Prior to <productname>PostgreSQL</productname> 7.2, the only defense
- against XID wraparound was to re-initdb at least every 4 billion
+ against XID wraparound was to re-<command>initdb</> at least every 4 billion
transactions. This of course was not very satisfactory for high-traffic
sites, so a better solution has been devised. The new approach allows an
- installation to remain up indefinitely, without initdb or any sort of
+ installation to remain up indefinitely, without <command>initdb</> or any sort of
restart. The price is this maintenance requirement:
- <emphasis>every table in the database must be VACUUMed at least once every
+ <emphasis>every table in the database must be vacuumed at least once every
billion transactions</emphasis>.
</para>
user-created databases that are to be marked <literal>datallowconn</> =
<literal>false</> in <filename>pg_database</>, since there isn't any
convenient way to vacuum a database that you can't connect to. Note
- that VACUUM's automatic warning message about unvacuumed databases will
+ that <command>VACUUM</command>'s automatic warning message about unvacuumed databases will
ignore <filename>pg_database</> entries with <literal>datallowconn</> =
<literal>false</>, so as to avoid giving false warnings about these
databases; therefore it's up to you to ensure that such databases are
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.13 2001/03/29 18:25:10 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/manage-ag.sgml,v 2.14 2001/09/09 23:52:12 petere Exp $
-->
<chapter id="managing-databases">
createdb <replaceable class="parameter">dbname</replaceable>
</synopsis>
- <filename>createdb</> does no magic. It connects to the template1
+ <command>createdb</> does no magic. It connects to the template1
database and executes the <command>CREATE DATABASE</> command,
exactly as described above. It uses <application>psql</> program
- internally. The reference page on createdb contains the invocation
- details. In particular, createdb without any arguments will create
+ internally. The reference page on <command>createdb</> contains the invocation
+ details. In particular, <command>createdb</> without any arguments will create
a database with the current user name, which may or may not be what
you want.
</para>
setenv PGDATA2 /home/postgres/data
</programlisting>
</informalexample>
- in csh or tcsh. You have to make sure that this environment
+ in <application>csh</> or <application>tcsh</>. You have to make sure that this environment
variable is always defined in the server environment, otherwise
you won't be able to access that database. Therefore you probably
want to set it in some sort of shell start-up file or server
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.18 2001/08/06 22:53:26 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.19 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="regress">
<title id="regress-title">Regression Tests</title>
<prompt>$ </prompt><userinput>gmake installcheck</userinput>
</screen>
The tests will expect to contact the server at the local host and the
- default port number, unless directed otherwise by PGHOST and PGPORT
+ default port number, unless directed otherwise by <envar>PGHOST</envar> and <envar>PGPORT</envar>
environment variables.
</para>
<title>Date and time differences</title>
<para>
- Some of the queries in the <quote>timestamp</quote> test will
+ Some of the queries in the <filename>timestamp</filename> test will
fail if you run the test on the day of a daylight-savings time
changeover, or the day before or after one. These queries assume
that the intervals between midnight yesterday, midnight today and
<para>
Most of the date and time results are dependent on the time zone
environment. The reference files are generated for time zone
- PST8PDT (Berkeley, California) and there will be apparent
+ <literal>PST8PDT</literal> (Berkeley, California) and there will be apparent
failures if the tests are not run with that time zone setting.
The regression test driver sets environment variable
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
ensures proper results. However, your system must provide library
- support for the PST8PDT time zone, or the time zone-dependent
+ support for the <literal>PST8PDT</literal> time zone, or the time zone-dependent
tests will fail. To verify that your machine does have this
support, type the following:
<screen>
<prompt>$ </prompt><userinput>env TZ=PST8PDT date</userinput>
</screen>
The command above should have returned the current system time in
- the PST8PDT time zone. If the PST8PDT database is not available,
+ the <literal>PST8PDT</literal> time zone. If the <literal>PST8PDT</literal> database is not available,
then your system may have returned the time in GMT. If the
- PST8PDT time zone is not available, you can set the time zone
+ <literal>PST8PDT</literal> time zone is not available, you can set the time zone
rules explicitly:
<programlisting>
PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ
<para>
Some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing
- pre-1970 PDT times to be displayed in PST instead. This will
+ pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This will
result in localized differences in the test results.
</para>
</sect2>
</para>
<para>
-You might wonder why we don't ORDER all the regress test SELECTs to
+You might wonder why we don't order all the regress test queries explicitly to
get rid of this issue once and for all. The reason is that that would
make the regression tests less useful, not more, since they'd tend
to exercise query plan types that produce ordered results to the
</synopsis>
The test name is just the name of the particular regression test
module. The platform pattern is a pattern in the style of
- expr(1) (that is, a regular expression with an implicit
+ <citerefentry><refentrytitle>expr</><manvolnum>1</></citerefentry> (that is, a regular expression with an implicit
<literal>^</literal> anchor
at the start). It is matched against the platform name as printed
by <filename>config.guess</filename> followed by
<para>
For example: some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing
- pre-1970 PDT times to be displayed in PST instead. This causes a
+ pre-1970 <acronym>PDT</acronym> times to be displayed in <acronym>PST</acronym> instead. This causes a
few differences in the <filename>horology</> regression test.
Therefore, we provide a variant comparison file,
<filename>horology-no-DST-before-1970.out</filename>, which includes
the results to be expected on these systems. To silence the bogus
- <quote>failure</quote> message on HPPA platforms, resultmap
+ <quote>failure</quote> message on <systemitem>HPPA</systemitem> platforms, <filename>resultmap</filename>
includes
<programlisting>
horology/hppa=horology-no-DST-before-1970
</programlisting>
- which will trigger on any machine for which config.guess's output
+ which will trigger on any machine for which the output of <command>config.guess</command>
begins with <quote><literal>hppa</literal></quote>. Other lines
- in resultmap select the variant comparison file for other
+ in <filename>resultmap</> select the variant comparison file for other
platforms where it's appropriate.
</para>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.98 2001/08/14 23:38:20 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/release.sgml,v 1.99 2001/09/09 23:52:12 petere Exp $
-->
<appendix id="release">
<listitem>
<para>
The previous C function manager did not
-handle NULLs properly, nor did it support 64-bit CPU's (Alpha). The new
+handle NULLs properly, nor did it support 64-bit <acronym>CPU</acronym>'s (Alpha). The new
function manager does. You can continue using your old custom
functions, but you may want to rewrite them in the future to use the new
function manager call interface.
<varlistentry>
<term>
- Updated psql
+ Updated <application>psql</application>
</term>
<listitem>
<para>
<application>psql</application>, our interactive terminal monitor, has been
- updated with a variety of new features. See the psql manual page for details.
+ updated with a variety of new features. See the <application>psql</application> manual page for details.
</para>
</listitem>
</varlistentry>
<listitem>
<para>
The date/time types <type>datetime</type> and
- <type>timespan</type> have been superceded by the
+ <type>timespan</type> have been superseded by the
SQL92-defined types <type>timestamp</type> and
<type>interval</type>. Although there has been some effort to
ease the transition by allowing
<para>
This is basically a cleanup release for 6.5.2. We have added a new
- pgaccess that was missing in 6.5.2, and installed an NT-specific fix.
+ <application>PgAccess</> that was missing in 6.5.2, and installed an NT-specific fix.
</para>
<listitem>
<para>
<application>pg_dump</application> takes advantage of the new
- MVCC features to give a consistant database dump/backup while
+ MVCC features to give a consistent database dump/backup while
the database stays online and available for queries.
</para>
</listitem>
<listitem>
<para>
We continue to expand our port list, this time including
- WinNT/ix86 and NetBSD/arm32.
+ <systemitem class="osname">Windows NT</>/<systemitem>ix86</> and <systemitem class="osname">NetBSD</>/<systemitem>arm32</>.
</para>
</listitem>
</varlistentry>
<para>
New and updated material is present throughout the
documentation. New <acronym>FAQ</acronym>s have been
- contributed for SGI and AIX platforms.
+ contributed for <systemitem class="osname">SGI</> and <systemitem class="osname">AIX</> platforms.
The <citetitle>Tutorial</citetitle> has introductory information
on <acronym>SQL</acronym> from Stefan Simkovics.
For the <citetitle>User's Guide</citetitle>, there are
<para>
Keep the above in mind if you are using
<filename>contrib/refint.*</filename> triggers for
- referential integrity. Additional technics are required now. One way is
+ referential integrity. Additional techniques are required now. One way is
to use <command>LOCK parent_table IN SHARE ROW EXCLUSIVE MODE</command>
command if a transaction is going to update/delete a primary key and
use <command>LOCK parent_table IN SHARE MODE</command> command if a
<para>
Note that if you run a transaction in SERIALIZABLE mode then you must
execute the <command>LOCK</command> commands above before execution of any
- DML statement
+ <acronym>DML</acronym> statement
(<command>SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO</command>) in the
transaction.
</para>
</listitem>
<listitem>
<para>
-Jan also contributed a second procedural language, PL/pgSQL, to go with the
-original PL/pgTCL procedural language he contributed last release.
+Jan also contributed a second procedural language, <application>PL/pgSQL</application>, to go with the
+original <application>PL/pgTCL</application> procedural language he contributed last release.
</para>
</listitem>
-->
<para>
-This is a bugfix release for 6.3.x.
+This is a bug-fix release for 6.3.x.
Refer to the release notes for version 6.3 for a more complete summary of new features.
</para>
<para>
</para>
<para>
A dump/restore is NOT required for those running 6.3 or 6.3.1. A
-'make distclean', 'make', and 'make install' is all that is required.
+<literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
This last step should be performed while the postmaster is not running.
You should re-link any custom applications that use <productname>Postgres</productname> libraries.
</para>
</para>
<para>
A dump/restore is NOT required for those running 6.3. A
-'make distclean', 'make', and 'make install' is all that is required.
+<literal>make distclean</>, <literal>make</>, and <literal>make install</> is all that is required.
This last step should be performed while the postmaster is not running.
You should re-link any custom applications that use <productname>Postgres</productname> libraries.
</para>
use them in the target list.
</para>
<para>
- Second, 6.3 uses unix domain sockets rather than TCP/IP by default. To
+ Second, 6.3 uses Unix domain sockets rather than TCP/IP by default. To
enable connections from other machines, you have to use the new
- postmaster -i option, and of course edit pg_hba.conf. Also, for this
- reason, the format of pg_hba.conf has changed.
+ postmaster -i option, and of course edit <filename>pg_hba.conf</filename>. Also, for this
+ reason, the format of <filename>pg_hba.conf</filename> has changed.
</para>
<para>
- Third, char() fields will now allow faster access than varchar() or
- text. Specifically, the text and varchar() have a penalty for access to
- any columns after the first column of this type. char() used to also
+ Third, <type>char()</type> fields will now allow faster access than <type>varchar()</type> or
+ <type>text</type>. Specifically, the <type>text</> and <type>varchar()</type> have a penalty for access to
+ any columns after the first column of this type. <type>char()</type> used to also
have this access penalty, but it no longer does. This may suggest that
you redesign some of your tables, especially if you have short character
- columns that you have defined as varchar() or text. This and other
+ columns that you have defined as <type>varchar()</type> or <type>text</type>. This and other
changes make 6.3 even faster than earlier releases.
</para>
<para>
See the <citetitle>Administrator's Guide</citetitle> for more
information. There is a new table, pg_shadow, which is used to store
user information and user passwords, and it by default only SELECT-able
- by the postgres super-user. pg_user is now a view of pg_shadow, and is
+ by the <systemitem>postgres</systemitem> super-user. pg_user is now a view of pg_shadow, and is
SELECT-able by PUBLIC. You should keep using pg_user in your
application without changes.
</para>
</para>
<para>
We also have real deadlock detection code. No more sixty-second
- timeouts. And the new locking code implements a FIFO better, so there
+ timeouts. And the new locking code implements a <acronym>FIFO</acronym> better, so there
should be less resource starvation during heavy use.
</para>
<para>
- Many complaints have been made about inadequate documenation in previous
+ Many complaints have been made about inadequate documentation in previous
releases. Thomas has put much effort into many new manuals for this
release. Check out the doc/ directory.
</para>
<para>
For performance reasons, time travel is gone, but can be implemented
- using triggers (see pgsql/contrib/spi/README). Please check out the new
+ using triggers (see <filename>pgsql/contrib/spi/README</filename>). Please check out the new
\d command for types, operators, etc. Also, views have their own
permissions now, not based on the underlying tables, so permissions on
- them have to be set separately. Check /pgsql/interfaces for some new
+ them have to be set separately. Check <filename>/pgsql/interfaces</filename> for some new
ways to talk to <productname>Postgres</productname>.
</para>
<para>
</para>
<para>
Another way to avoid dump/reload is to use the following SQL command
-from psql to update the existing system table:
+from <command>psql</command> to update the existing system table:
<programlisting>
update pg_aggregate set aggfinalfn = 'cash_div_flt8'
restore of the database in 6.2.
</para>
<para>
-Note that the pg_dump and pg_dumpall utility from 6.2 should be used
+Note that the <command>pg_dump</command> and <command>pg_dumpall</command> utility from 6.2 should be used
to dump the 6.1 database.
</para>
</sect2>
</para>
<para>
- Three new data types (datetime, timespan, and circle) have been added to
+ Three new data types (<type>datetime</type>, <type>timespan</type>, and <type>circle</type>) have been added to
the native set of <productname>Postgres</productname> types. Points, boxes, paths, and polygons
- have had their output formats made consistant across the data types.
+ have had their output formats made consistent across the data types.
The polygon output in misc.out has only been spot-checked for correctness
relative to the original regression output.
</para>
<para>
The float8 regression test fails on at least some platforms. This is due
- to differences in implementations of pow() and exp() and the signaling
+ to differences in implementations of <function>pow()</function> and <function>exp()</function> and the signaling
mechanisms used for overflow and underflow conditions.
</para>
<para>
Here is a new migration file for 1.02.1. It includes the 'copy' change
-and a script to convert old ascii files.
+and a script to convert old <acronym>ASCII</acronym> files.
</para>
<note>
<para>
The following notes are for the benefit of users who want to migrate
-databases from postgres95 1.01 and 1.02 to postgres95 1.02.1.
+databases from <productname>Postgres95</> 1.01 and 1.02 to <productname>Postgres95</> 1.02.1.
</para>
<para>
-If you are starting afresh with postgres95 1.02.1 and do not need
+If you are starting afresh with <productname>Postgres95</> 1.02.1 and do not need
to migrate old databases, you do not need to read any further.
</para>
</note>
<para>
-In order to upgrade older postgres95 version 1.01 or 1.02 databases to
+In order to upgrade older <productname>Postgres95</> version 1.01 or 1.02 databases to
version 1.02.1, the following steps are required:
</para>
<procedure>
Add the new built-in functions and operators of 1.02.1 to 1.01 or 1.02
databases. This is done by running the new 1.02.1 server against
your own 1.01 or 1.02 database and applying the queries attached at
- the end of thie file. This can be done easily through psql. If your
- 1.01 or 1.02 database is named "testdb" and you have cut the commands
- from the end of this file and saved them in addfunc.sql:
+ the end of the file. This can be done easily through <command>psql</>. If your
+ 1.01 or 1.02 database is named <literal>testdb</literal> and you have cut the commands
+ from the end of this file and saved them in <filename>addfunc.sql</filename>:
<programlisting>
% psql testdb -f addfunc.sql
</programlisting>
<title>Dump/Reload Procedure</title>
<para>
-If you are trying to reload a pg_dump or text-mode 'copy tablename to
-stdout' generated with a previous version, you will need to run the
-attached sed script on the ASCII file before loading it into the
+If you are trying to reload a pg_dump or text-mode, <literal>copy tablename to
+stdout</literal> generated with a previous version, you will need to run the
+attached <command>sed</command> script on the ASCII file before loading it into the
database. The old format used '.' as end-of-data, while '\.' is now the
end-of-data marker. Also, empty strings are now loaded in as '' rather
than NULL. See the copy manual page for full details.
<para>
The following notes are for the benefit of users who want to migrate
-databases from postgres95 1.0 to postgres95 1.01.
+databases from <productname>Postgres95</> 1.0 to <productname>Postgres95</> 1.01.
</para>
<para>
-If you are starting afresh with postgres95 1.01 and do not need
+If you are starting afresh with <productname>Postgres95</> 1.01 and do not need
to migrate old databases, you do not need to read any further.
</para>
<para>
-In order to postgres95 version 1.01 with databases created with
-postgres95 version 1.0, the following steps are required:
+In order to <productname>Postgres95</> version 1.01 with databases created with
+<productname>Postgres95</> version 1.0, the following steps are required:
</para>
<procedure>
<step>
<para>
-Set the definition of NAMEDATALEN in src/Makefile.global to 16
- and OIDNAMELEN to 20.
+Set the definition of <symbol>NAMEDATALEN</symbol> in <filename>src/Makefile.global</filename> to 16
+ and <symbol>OIDNAMELEN</symbol> to 20.
</para>
</step>
<step>
<substeps>
<step>
<para>
-If you do, you must create a file name "pg_hba" in your top-level data
- directory (typically the value of your $PGDATA). src/libpq/pg_hba
+If you do, you must create a file name <literal>pg_hba</literal> in your top-level data
+ directory (typically the value of your <envar>$PGDATA</envar>). <filename>src/libpq/pg_hba</filename>
shows an example syntax.
</para>
</step>
<programlisting>
HBA = 1
</programlisting>
- in src/Makefile.global
+ in <filename>src/Makefile.global</filename>
</para>
<para>
Note that host-based authentication is turned on by default, and if
<step>
<para>
-Compile and install 1.01, but DO NOT do the initdb step.
+Compile and install 1.01, but DO NOT do the <command>initdb</command> step.
</para>
</step>
<step>
<para>
Before doing anything else, terminate your 1.0 postmaster, and
- backup your existing $PGDATA directory.
+ backup your existing <envar>$PGDATA</envar> directory.
</para>
</step>
<step>
<para>
-Set your PGDATA environment variable to your 1.0 databases, but set up
+Set your <envar>PGDATA</envar> environment variable to your 1.0 databases, but set up
path up so that 1.01 binaries are being used.
</para>
</step>
<step>
<para>
-Modify the file $PGDATA/PG_VERSION from 5.0 to 5.1
+Modify the file <filename><envar>$PGDATA</envar>/PG_VERSION</filename> from 5.0 to 5.1
</para>
</step>
<step>
Add the new built-in functions and operators of 1.01 to 1.0
databases. This is done by running the new 1.01 server against
your own 1.0 database and applying the queries attached and saving
- in the file 1.0_to_1.01.sql. This can be done easily through psql.
- If your 1.0 database is name "testdb":
+ in the file 1.0_to_1.01.sql. This can be done easily through <command>psql</command>.
+ If your 1.0 database is name <literal>testdb</literal>:
<programlisting>
% psql testdb -f 1.0_to_1.01.sql
04:21 Dual Pentium Pro 180, 224MB, UW-SCSI, Linux 2.0.36, gcc 2.7.2.3 -O2 -m486
</programlisting>
- For the linux system above, using UW-SCSI disks rather than (older) IDE
+ For the <systemitem class="osname">Linux</systemitem> system above, using <acronym>UW-SCSI</acronym> disks rather than (older) <acronym>IDE</acronym>
disks leads to a 50% improvement in speed on the regression test.
</para>
</sect2>
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.76 2001/09/07 00:46:41 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.77 2001/09/09 23:52:12 petere Exp $
-->
<Chapter Id="runtime">
<para>
To add a user account to your system, look for a command
<command>useradd</command> or <command>adduser</command>. The user
- name <quote>postgres</quote> is often used but by no means
+ name <systemitem>postgres</systemitem> is often used but by no means
required.
</para>
</sect1>
current locale is done by changing the value of the environment variable
<literal>LC_ALL</literal> or <literal>LANG</literal>. The sort order used
within a particular database cluster is set by <command>initdb</command>
- and cannot be changed later, short of dumping all data, re-initdb,
+ and cannot be changed later, short of dumping all data, rerunning <command>initdb</command>,
reload data. So it's important to make this choice correctly now.
</para>
</sect1>
<programlisting>
su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgsql/data"
</programlisting>
- Then, create a symlink to it in <filename>/etc/rc3.d</> as
+ Then, create a symbolic link to it in <filename>/etc/rc3.d</> as
<literal>S99postgresql</>.
</para>
</listitem>
<para>
While the <application>postmaster</application> is running, its
- PID is in the file <filename>postmaster.pid</filename> in the data
+ <acronym>PID</acronym> is in the file <filename>postmaster.pid</filename> in the data
directory. This is used as an interlock against multiple postmasters
running in the same data directory, and can also be used for
shutting down the postmaster.
</para>
<para>
- Details about configuring System V IPC facilities are given in
+ Details about configuring <systemitem class="osname">System V</> <acronym>IPC</> facilities are given in
<xref linkend="sysvipc">.
</para>
</sect2>
<para>
All parameter names are case-insensitive. Every parameter takes a
- value of one of the four types boolean, integer, floating point,
+ value of one of the four types Boolean, integer, floating point,
string as described below. Boolean values are
<literal>ON</literal>, <literal>OFF</literal>,
<literal>TRUE</literal>, <literal>FALSE</literal>,
<primary>SIGHUP</primary>
</indexterm>
The configuration file is reread whenever the postmaster receives
- a SIGHUP signal. This signal is also propagated to all running
+ a <systemitem>SIGHUP</> signal. This signal is also propagated to all running
backend processes, so that running sessions get the new default.
Alternatively, you can send the signal to only one backend process
directly.
<para>
<variablelist>
<varlistentry>
- <term>CPU_INDEX_TUPLE_COST (<type>floating point</type>)</term>
+ <term><varname>CPU_INDEX_TUPLE_COST</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Sets the query optimizer's estimate of the cost of processing
</varlistentry>
<varlistentry>
- <term>CPU_OPERATOR_COST (<type>floating point</type>)</term>
+ <term><varname>CPU_OPERATOR_COST</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Sets the optimizer's estimate of the cost of processing each
</varlistentry>
<varlistentry>
- <term>CPU_TUPLE_COST (<type>floating point</type>)</term>
+ <term><varname>CPU_TUPLE_COST</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Sets the query optimizer's estimate of the cost of processing
</varlistentry>
<varlistentry>
- <term>EFFECTIVE_CACHE_SIZE (<type>floating point</type>)</term>
+ <term><varname>EFFECTIVE_CACHE_SIZE</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Sets the optimizer's assumption about the effective size of
</varlistentry>
<varlistentry>
- <term>ENABLE_HASHJOIN (<type>boolean</type>)</term>
+ <term><varname>ENABLE_HASHJOIN</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of hash-join plan
<primary>index scan</primary>
</indexterm>
- <term>ENABLE_INDEXSCAN (<type>boolean</type>)</term>
+ <term><varname>ENABLE_INDEXSCAN</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of index scan plan
</varlistentry>
<varlistentry>
- <term>ENABLE_MERGEJOIN (<type>boolean</type>)</term>
+ <term><varname>ENABLE_MERGEJOIN</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of merge-join plan
</varlistentry>
<varlistentry>
- <term>ENABLE_NESTLOOP (<type>boolean</type>)</term>
+ <term><varname>ENABLE_NESTLOOP</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of nested-loop
<primary>sequential scan</primary>
</indexterm>
- <term>ENABLE_SEQSCAN (<type>boolean</type>)</term>
+ <term><varname>ENABLE_SEQSCAN</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of sequential scan
</varlistentry>
<varlistentry>
- <term>ENABLE_SORT (<type>boolean</type>)</term>
+ <term><varname>ENABLE_SORT</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables the query planner's use of explicit sort
</varlistentry>
<varlistentry>
- <term>ENABLE_TIDSCAN (<type>boolean</type>)</term>
+ <term><varname>ENABLE_TIDSCAN</varname> (<type>boolean</type>)</term>
<listitem>
<para>
- Enables or disables the query planner's use of TID scan plan
+ Enables or disables the query planner's use of <acronym>TID</> scan plan
types. The default is on. This is mostly useful to debug the
query planner.
</para>
<see>genetic query optimization</see>
</indexterm>
- <term>GEQO (<type>boolean</type>)</term>
+ <term><varname>GEQO</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables or disables genetic query optimization, which is an
algorithm that attempts to do query planning without
exhaustive search. This is on by default. See also the various
- other GEQO_ settings.
+ other <varname>GEQO_</varname> settings.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>GEQO_EFFORT (<type>integer</type>)</term>
- <term>GEQO_GENERATIONS (<type>integer</type>)</term>
- <term>GEQO_POOL_SIZE (<type>integer</type>)</term>
- <term>GEQO_RANDOM_SEED (<type>integer</type>)</term>
- <term>GEQO_SELECTION_BIAS (<type>floating point</type>)</term>
+ <term><varname>GEQO_EFFORT</varname> (<type>integer</type>)</term>
+ <term><varname>GEQO_GENERATIONS</varname> (<type>integer</type>)</term>
+ <term><varname>GEQO_POOL_SIZE</varname> (<type>integer</type>)</term>
+ <term><varname>GEQO_RANDOM_SEED</varname> (<type>integer</type>)</term>
+ <term><varname>GEQO_SELECTION_BIAS</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Various tuning parameters for the genetic query optimization
are between 1 and 80, 40 being the default. Generations
specifies the number of iterations in the algorithm. The
number must be a positive integer. If 0 is specified then
- Effort * Log2(PoolSize) is used. The run time of the algorithm
+ <literal>Effort * Log2(PoolSize)</literal> is used. The run time of the algorithm
is roughly proportional to the sum of pool size and
generations. The selection bias is the selective pressure
within the population. Values can be from 1.50 to 2.00; the
latter is the default. The random seed can be set to get
- reproduceable results from the algorithm. If it is set to -1
+ reproducible results from the algorithm. If it is set to -1
then the algorithm behaves non-deterministically.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>GEQO_THRESHOLD (<type>integer</type>)</term>
+ <term><varname>GEQO_THRESHOLD</varname> (<type>integer</type>)</term>
<listitem>
<para>
Use genetic query optimization to plan queries with at least
</varlistentry>
<varlistentry>
- <term>KSQO (<type>boolean</type>)</term>
+ <term><varname>KSQO</varname> (<type>boolean</type>)</term>
<listitem>
<para>
The <firstterm>Key Set Query Optimizer</firstterm>
- (<abbrev>KSQO</abbrev>) causes the query planner to convert
+ (<acronym>KSQO</acronym>) causes the query planner to convert
queries whose WHERE clause contains many OR'ed AND clauses
(such as <literal>WHERE (a=1 AND b=2) OR (a=2 AND b=3)
...</literal>) into a UNION query. This method can be faster
than the default implementation, but it doesn't necessarily
give exactly the same results, since UNION implicitly adds a
SELECT DISTINCT clause to eliminate identical output rows.
- KSQO is commonly used when working with products like
+ <acronym>KSQO</acronym> is commonly used when working with products like
<productname>Microsoft Access</productname>, which tend to
generate queries of this form.
</para>
<para>
- The KSQO algorithm used to be absolutely essential for queries
+ The <acronym>KSQO</acronym> algorithm used to be absolutely essential for queries
with many OR'ed AND clauses, but in
<productname>Postgres</productname> 7.0 and later the standard
planner handles these queries fairly successfully. Hence the
</varlistentry>
<varlistentry>
- <term>RANDOM_PAGE_COST (<type>floating point</type>)</term>
+ <term><varname>RANDOM_PAGE_COST</varname> (<type>floating point</type>)</term>
<listitem>
<para>
Sets the query optimizer's estimate of the cost of a
<para>
<variablelist>
<varlistentry>
- <term>DEBUG_ASSERTIONS (<type>boolean</type>)</term>
+ <term><varname>DEBUG_ASSERTIONS</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Turns on various assertion checks. This is a debugging aid. If
</varlistentry>
<varlistentry>
- <term>DEBUG_LEVEL (<type>integer</type>)</term>
+ <term><varname>DEBUG_LEVEL</varname> (<type>integer</type>)</term>
<listitem>
<para>
The higher this value is set, the more
</varlistentry>
<varlistentry>
- <term>DEBUG_PRINT_QUERY (<type>boolean</type>)</term>
- <term>DEBUG_PRINT_PARSE (<type>boolean</type>)</term>
- <term>DEBUG_PRINT_REWRITTEN (<type>boolean</type>)</term>
- <term>DEBUG_PRINT_PLAN (<type>boolean</type>)</term>
- <term>DEBUG_PRETTY_PRINT (<type>boolean</type>)</term>
+ <term><varname>DEBUG_PRINT_QUERY</varname> (<type>boolean</type>)</term>
+ <term><varname>DEBUG_PRINT_PARSE</varname> (<type>boolean</type>)</term>
+ <term><varname>DEBUG_PRINT_REWRITTEN</varname> (<type>boolean</type>)</term>
+ <term><varname>DEBUG_PRINT_PLAN</varname> (<type>boolean</type>)</term>
+ <term><varname>DEBUG_PRETTY_PRINT</varname> (<type>boolean</type>)</term>
<listitem>
<para>
These flags enable various debugging output to be sent to the
</varlistentry>
<varlistentry>
- <term>HOSTNAME_LOOKUP (<type>boolean</type>)</term>
+ <term><varname>HOSTNAME_LOOKUP</varname> (<type>boolean</type>)</term>
<listitem>
<para>
By default, connection logs only show the IP address of the
</varlistentry>
<varlistentry>
- <term>LOG_CONNECTIONS (<type>boolean</type>)</term>
+ <term><varname>LOG_CONNECTIONS</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Prints a line informing about each successful connection to
</varlistentry>
<varlistentry>
- <term>LOG_PID (<type>boolean</type>)</term>
+ <term><varname>LOG_PID</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Prefixes each server log message with the process id of the
</varlistentry>
<varlistentry>
- <term>LOG_TIMESTAMP (<type>boolean</type>)</term>
+ <term><varname>LOG_TIMESTAMP</varname> (<type>boolean</type>)</term>
<listitem>
<para>
- Prefixes each server log message with a timestamp. The default
+ Prefixes each server log message with a time stamp. The default
is off.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>SHOW_QUERY_STATS (<type>boolean</type>)</term>
- <term>SHOW_PARSER_STATS (<type>boolean</type>)</term>
- <term>SHOW_PLANNER_STATS (<type>boolean</type>)</term>
- <term>SHOW_EXECUTOR_STATS (<type>boolean</type>)</term>
+ <term><varname>SHOW_QUERY_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>SHOW_PARSER_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>SHOW_PLANNER_STATS</varname> (<type>boolean</type>)</term>
+ <term><varname>SHOW_EXECUTOR_STATS</varname> (<type>boolean</type>)</term>
<listitem>
<para>
For each query, write performance statistics of the respective
</varlistentry>
<varlistentry>
- <term>SHOW_SOURCE_PORT (<type>boolean</type>)</term>
+ <term><varname>SHOW_SOURCE_PORT</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Shows the outgoing port number of the connecting host in the
</varlistentry>
<varlistentry>
- <term>SYSLOG (<type>integer</type>)</term>
+ <term><varname>SYSLOG</varname> (<type>integer</type>)</term>
<listitem>
<para>
<productname>Postgres</productname> allows the use of
- <application>syslog</application> for logging. If this option
- is set to 1, messages go both to syslog and the standard
- output. A setting of 2 sends output only to syslog. (Some
+ <systemitem>syslog</systemitem> for logging. If this option
+ is set to 1, messages go both to <systemitem>syslog</> and the standard
+ output. A setting of 2 sends output only to <systemitem>syslog</>. (Some
messages will still go to the standard output/error.) The
- default is 0, which means syslog is off. This option must be
+ default is 0, which means <systemitem>syslog</> is off. This option must be
set at server start.
</para>
<para>
- To use syslog, the build of
+ To use <systemitem>syslog</>, the build of
<productname>Postgres</productname> must be configured with
the <option>--enable-syslog</option> option.
</para>
</varlistentry>
<varlistentry>
- <term>SYSLOG_FACILITY (<type>string</type>)</term>
+ <term><varname>SYSLOG_FACILITY</varname> (<type>string</type>)</term>
<listitem>
<para>
This option determines the <application>syslog</application>
- <quote>facility</quote> to be used when syslog is enabled.
+ <quote>facility</quote> to be used when <application>syslog</application> is enabled.
You may choose from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4,
LOCAL5, LOCAL6, LOCAL7; the default is LOCAL0. See also the
documentation of your system's
</varlistentry>
<varlistentry>
- <term>SYSLOG_IDENT (<type>string</type>)</term>
+ <term><varname>SYSLOG_IDENT</varname> (<type>string</type>)</term>
<listitem>
<para>
- If logging to syslog is enabled, this option determines the
+ If logging to <application>syslog</> is enabled, this option determines the
program name used to identify
<productname>PostgreSQL</productname> messages in
<application>syslog</application> log messages. The default
- is <quote>postgres</quote>.
+ is <literal>postgres</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>TRACE_NOTIFY (<type>boolean</type>)</term>
+ <term><varname>TRACE_NOTIFY</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Generates a great amount of debugging output for the
<para>
<variablelist>
<varlistentry>
- <term>AUSTRALIAN_TIMEZONES (<type>bool</type>)</term>
+ <term><varname>AUSTRALIAN_TIMEZONES</varname> (<type>bool</type>)</term>
<listitem>
<para>
If set to true, <literal>CST</literal>, <literal>EST</literal>,
and <literal>SAT</literal> are interpreted as Australian
- timezones rather than as North American Central/Eastern
- Timezones and Saturday. The default is false.
+ time zones rather than as North American Central/Eastern
+ time zones and Saturday. The default is false.
</para>
</listitem>
</varlistentry>
<secondary>timeout</secondary>
</indexterm>
- <term>DEADLOCK_TIMEOUT (<type>integer</type>)</term>
+ <term><varname>DEADLOCK_TIMEOUT</varname> (<type>integer</type>)</term>
<listitem>
<para>
This is the amount of time, in milliseconds, to wait on a lock
<primary>transaction isolation level</primary>
</indexterm>
- <term>DEFAUL_TRANSACTION_ISOLATION (<type>string</type>)</term>
+ <term><varname>DEFAUL_TRANSACTION_ISOLATION</varname> (<type>string</type>)</term>
<listitem>
<para>
Each SQL transaction has an isolation level, which can be
</varlistentry>
<varlistentry>
- <term>DYNAMIC_LIBRARY_PATH (<type>string</type>)</term>
+ <term><varname>DYNAMIC_LIBRARY_PATH</varname> (<type>string</type>)</term>
<listitem>
<para>
If a dynamically loadable module needs to be opened and the
<primary>fsync</primary>
</indexterm>
- <term>FSYNC (<type>boolean</type>)</term>
+ <term><varname>FSYNC</varname> (<type>boolean</type>)</term>
<listitem>
<para>
If this option is on, the <productname>Postgres</> backend
to block and wait for the operating system to flush the
buffers. Without <function>fsync</>, the operating system is
allowed to do its best in buffering, sorting, and delaying
- writes, which can make for a considerable perfomance
+ writes, which can make for a considerable performance
increase. However, if the system crashes, the results of the
last few committed transactions may be lost in part or whole;
in the worst case, unrecoverable data corruption may occur.
some leave it on just to be on the safe side. Because it is
the safe side, on is also the default. If you trust your
operating system, your hardware, and your utility company (or
- better your UPS), you might want to disable fsync.
+ better your UPS), you might want to disable <varname>fsync</varname>.
</para>
<para>
</varlistentry>
<varlistentry>
- <term>KRB_SERVER_KEYFILE (<type>string</type>)</term>
+ <term><varname>KRB_SERVER_KEYFILE</varname> (<type>string</type>)</term>
<listitem>
<para>
Sets the location of the Kerberos server key file. See
</varlistentry>
<varlistentry>
- <term>MAX_CONNECTIONS (<type>integer</type>)</term>
+ <term><varname>MAX_CONNECTIONS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Determines how many concurrent connections the database server
</varlistentry>
<varlistentry>
- <term>MAX_EXPR_DEPTH (<type>integer</type>)</term>
+ <term><varname>MAX_EXPR_DEPTH</varname> (<type>integer</type>)</term>
<listitem>
<para>
Sets the maximum expression nesting depth that the parser will
</varlistentry>
<varlistentry>
- <term>MAX_FSM_RELATIONS (<type>integer</type>)</term>
+ <term><varname>MAX_FSM_RELATIONS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Sets the maximum number of relations (tables) for which free space
</varlistentry>
<varlistentry>
- <term>MAX_FSM_PAGES (<type>integer</type>)</term>
+ <term><varname>MAX_FSM_PAGES</varname> (<type>integer</type>)</term>
<listitem>
<para>
Sets the maximum number of disk pages for which free space
</varlistentry>
<varlistentry>
- <term>MAX_LOCKS_PER_XACT (<type>integer</type>)</term>
+ <term><varname>MAX_LOCKS_PER_XACT</varname> (<type>integer</type>)</term>
<listitem>
<para>
The shared lock table is sized on the assumption that at most
- max_locks_per_xact * max_connections distinct objects will need
+ <varname>max_locks_per_xact</> * <varname>max_connections</varname> distinct objects will need
to be locked at any one time. The default, 64, has historically
proven sufficient, but you might need to raise this value if you
have clients that touch many different tables in a single transaction.
</varlistentry>
<varlistentry>
- <term>PORT (<type>integer</type>)</term>
+ <term><varname>PORT</varname> (<type>integer</type>)</term>
<listitem>
<para>
The TCP port the server listens on; 5432 by default. This
</varlistentry>
<varlistentry>
- <term>SHARED_BUFFERS (<type>integer</type>)</term>
+ <term><varname>SHARED_BUFFERS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Sets the number of shared memory buffers the database server
</varlistentry>
<varlistentry>
- <term>SILENT_MODE (<type>bool</type>)</term>
+ <term><varname>SILENT_MODE</varname> (<type>bool</type>)</term>
<listitem>
<para>
Runs postmaster silently. If this option is set, postmaster
will automatically run in background and any controlling ttys
- are disassociated, thus no messages are written to stdout or
- stderr (same effect as postmaster's -S option). Unless some
- logging system such as syslog is enabled, using this option is
+ are disassociated, thus no messages are written to standard output or
+ standard error (same effect as postmaster's -S option). Unless some
+ logging system such as <application>syslog</> is enabled, using this option is
discouraged since it makes it impossible to see error
messages.
</para>
</varlistentry>
<varlistentry>
- <term>SORT_MEM (<type>integer</type>)</term>
+ <term><varname>SORT_MEM</varname> (<type>integer</type>)</term>
<listitem>
<para>
Specifies the amount of memory to be used by internal sorts
much memory as this value specifies before it starts to put
data into temporary files. And don't forget that each running
backend could be doing one or more sorts. So the total memory
- space needed could be many times the value of SORT_MEM.
+ space needed could be many times the value of <varname>SORT_MEM</varname>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>SQL_INHERITANCE (<type>bool</type>)</term>
+ <term><varname>SQL_INHERITANCE</varname> (<type>bool</type>)</term>
<listitem>
<para>
This controls the inheritance semantics, in particular whether
subtables are included into the consideration of various
commands by default. This was not the case in versions prior
- to 7.1. If you need the old behaviour you can set this
+ to 7.1. If you need the old behavior you can set this
variable to off, but in the long run you are encouraged to
change your applications to use the <literal>ONLY</literal>
keyword to exclude subtables. See the SQL language reference
<primary>SSL</primary>
</indexterm>
- <term>SSL (<type>boolean</type>)</term>
+ <term><varname>SSL</varname> (<type>boolean</type>)</term>
<listitem>
<para>
Enables <acronym>SSL</> connections. Please read
</varlistentry>
<varlistentry>
- <term>TCPIP_SOCKET (<type>boolean</type>)</term>
+ <term><varname>TCPIP_SOCKET</varname> (<type>boolean</type>)</term>
<listitem>
<para>
If this is true, then the server will accept TCP/IP
</varlistentry>
<varlistentry>
- <term>UNIX_SOCKET_DIRECTORY (<type>string</type>)</term>
+ <term><varname>UNIX_SOCKET_DIRECTORY</varname> (<type>string</type>)</term>
<listitem>
<para>
Specifies the directory of the Unix-domain socket on which the
</varlistentry>
<varlistentry>
- <term>UNIX_SOCKET_GROUP (<type>string</type>)</term>
+ <term><varname>UNIX_SOCKET_GROUP</varname> (<type>string</type>)</term>
<listitem>
<para>
Sets the group owner of the Unix domain socket. (The owning
</varlistentry>
<varlistentry>
- <term>UNIX_SOCKET_PERMISSIONS (<type>integer</type>)</term>
+ <term><varname>UNIX_SOCKET_PERMISSIONS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Sets the access permissions of the Unix domain socket. Unix
</varlistentry>
<varlistentry>
- <term>VIRTUAL_HOST (<type>string</type>)</term>
+ <term><varname>VIRTUAL_HOST</varname> (<type>string</type>)</term>
<listitem>
<para>
- Specifies the TCP/IP hostname or address on which the
+ Specifies the TCP/IP host name or address on which the
<application>postmaster</application> is to listen for
connections from client applications. Defaults to
- listening on all configured addresses (including localhost).
+ listening on all configured addresses (including <systemitem class="systemname">localhost</>).
</para>
</listitem>
</varlistentry>
<variablelist>
<varlistentry>
- <term>CHECKPOINT_SEGMENTS (<type>integer</type>)</term>
+ <term><varname>CHECKPOINT_SEGMENTS</varname> (<type>integer</type>)</term>
<listitem>
<para>
- Maximum distance between automatic WAL checkpoints, in logfile
+ Maximum distance between automatic WAL checkpoints, in log file
segments (each segment is normally 16 megabytes).
This option can only be set at server start or in the
<filename>postgresql.conf</filename> file.
</varlistentry>
<varlistentry>
- <term>CHECKPOINT_TIMEOUT (<type>integer</type>)</term>
+ <term><varname>CHECKPOINT_TIMEOUT</varname> (<type>integer</type>)</term>
<listitem>
<para>
Maximum time between automatic WAL checkpoints, in seconds.
</varlistentry>
<varlistentry>
- <term>COMMIT_DELAY (<type>integer</type>)</term>
+ <term><varname>COMMIT_DELAY</varname> (<type>integer</type>)</term>
<listitem>
<para>
Time delay between writing a commit record to the WAL buffer and
</varlistentry>
<varlistentry>
- <term>COMMIT_SIBLINGS (<type>integer</type>)</term>
+ <term><varname>COMMIT_SIBLINGS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Minimum number of concurrent open transactions to require before
</varlistentry>
<varlistentry>
- <term>WAL_BUFFERS (<type>integer</type>)</term>
+ <term><varname>WAL_BUFFERS</varname> (<type>integer</type>)</term>
<listitem>
<para>
Number of disk-page buffers in shared memory for WAL log.
</varlistentry>
<varlistentry>
- <term>WAL_DEBUG (<type>integer</type>)</term>
+ <term><varname>WAL_DEBUG</varname> (<type>integer</type>)</term>
<listitem>
<para>
If non-zero, turn on WAL-related debugging output on standard
</varlistentry>
<varlistentry>
- <term>WAL_FILES (<type>integer</type>)</term>
+ <term><varname>WAL_FILES</varname> (<type>integer</type>)</term>
<listitem>
<para>
Number of log files that are created in advance at checkpoint
</varlistentry>
<varlistentry>
- <term>WAL_SYNC_METHOD (<type>string</type>)</term>
+ <term><varname>WAL_SYNC_METHOD</varname> (<type>string</type>)</term>
<listitem>
<para>
Method used for forcing WAL updates out to disk. Possible
</thead>
<tbody>
<row>
- <entry>-B <replaceable>x</replaceable></entry>
- <entry>shared_buffers = <replaceable>x</replaceable></entry>
+ <entry><option>-B <replaceable>x</replaceable></option></entry>
+ <entry><literal>shared_buffers = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-d <replaceable>x</replaceable></entry>
- <entry>debug_level = <replaceable>x</replaceable></entry>
+ <entry><option>-d <replaceable>x</replaceable></option></entry>
+ <entry><literal>debug_level = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-F</entry>
- <entry>fsync = off</entry>
+ <entry><option>-F</option></entry>
+ <entry><literal>fsync = off</></entry>
<entry></entry>
</row>
<row>
- <entry>-h <replaceable>x</replaceable></entry>
- <entry>virtual_host = <replaceable>x</replaceable></entry>
+ <entry><option>-h <replaceable>x</replaceable></option></entry>
+ <entry><literal>virtual_host = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-i</entry>
- <entry>tcpip_socket = on</entry>
+ <entry><option>-i</option></entry>
+ <entry><literal>tcpip_socket = on</></entry>
<entry></entry>
</row>
<row>
- <entry>-k <replaceable>x</replaceable></entry>
- <entry>unix_socket_directory = <replaceable>x</replaceable></entry>
+ <entry><option>-k <replaceable>x</replaceable></option></entry>
+ <entry><literal>unix_socket_directory = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-l</entry>
- <entry>ssl = on</entry>
+ <entry><option>-l</option></entry>
+ <entry><literal>ssl = on</></entry>
<entry></entry>
</row>
<row>
- <entry>-N <replaceable>x</replaceable></entry>
- <entry>max_connections = <replaceable>x</replaceable></entry>
+ <entry><option>-N <replaceable>x</replaceable></option></entry>
+ <entry><literal>max_connections = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-p <replaceable>x</replaceable></entry>
- <entry>port = <replaceable>x</replaceable></entry>
+ <entry><option>-p <replaceable>x</replaceable></option></entry>
+ <entry><literal>port = <replaceable>x</replaceable></></entry>
<entry></entry>
</row>
<row>
- <entry>-fi, -fh, -fm, -fn, -fs, -ft</entry>
- <entry>enable_indexscan=off, enable_hashjoin=off,
- enable_mergejoin=off, enable_nestloop=off, enable_seqscan=off,
- enable_tidscan=off</entry>
+ <entry><option>-fi</option>, <option>-fh</option>, <option>-fm</option>, <option>-fn</option>, <option>-fs</option>, <option>-ft</option></entry>
+ <entry><literal>enable_indexscan=off</>, <literal>enable_hashjoin=off</>,
+ <literal>enable_mergejoin=off</>, <literal>enable_nestloop=off</>, <literal>enable_seqscan=off</>,
+ <literal>enable_tidscan=off</></entry>
<entry>*</entry>
</row>
<row>
- <entry>-S <replaceable>x</replaceable></entry>
- <entry>sort_mem = <replaceable>x</replaceable></entry>
+ <entry><option>-S <replaceable>x</replaceable></option></entry>
+ <entry><literal>sort_mem = <replaceable>x</replaceable></></entry>
<entry>*</entry>
</row>
<row>
- <entry>-s</entry>
- <entry>show_query_stats = on</entry>
+ <entry><option>-s</option></entry>
+ <entry><literal>show_query_stats = on</></entry>
<entry>*</entry>
</row>
<row>
- <entry>-tpa, -tpl, -te</entry>
- <entry>show_parser_stats=on, show_planner_stats=on, show_executor_stats=on</entry>
+ <entry><option>-tpa</option>, <option>-tpl</option>, <option>-te</option></entry>
+ <entry><literal>show_parser_stats=on</>, <literal>show_planner_stats=on</>, <literal>show_executor_stats=on</></entry>
<entry>*</entry>
</row>
</tbody>
<para>
Shared memory and semaphores are collectively referred to as
- <quote>System V IPC</> (together with message queues, which are
+ <quote><systemitem class="osname">System V</> <acronym>IPC</></quote> (together with message queues, which are
not relevant for <productname>Postgres</>). Almost all modern
operating systems provide these features, but not all of them have
them turned on or sufficiently sized by default, especially
- systems with BSD heritage. (For the QNX and BeOS ports,
+ systems with BSD heritage. (For the <systemitem class="osname">QNX</> and <systemitem class="osname">BeOS</> ports,
<productname>Postgres</> provides its own replacement
implementation of these facilities.)
</para>
<para>
When <productname>Postgres</> exceeds one of the various hard
- limits of the IPC resources then the postmaster will refuse to
+ limits of the <acronym>IPC</> resources then the postmaster will refuse to
start up and should leave a marginally instructive error message
about which problem was encountered and what needs to be done
about it. (See also <xref linkend="postmaster-start-failures">.)
<table id="sysvipc-parameters">
- <title>System V IPC parameters</>
+ <title><systemitem class="osname">System V</> <acronym>IPC</> parameters</>
<tgroup cols="3">
<thead>
<row>
<entry><varname>SHMMAX</></>
<entry>Maximum size of shared memory segment (bytes)</>
- <entry>250 kB + 8.2kB * buffers + 14.2kB * max_connections or infinity</entry>
+ <entry>250 kB + 8.2kB * <varname>shared_buffers</> + 14.2kB * <varname>max_connections</> or infinity</entry>
</row>
<row>
<row>
<entry><varname>SHMALL</></>
<entry>Total amount of shared memory available (bytes or pages)</>
- <entry>if bytes, same as SHMMAX; if pages, ceil(SHMMAX/PAGE_SIZE)</>
+ <entry>if bytes, same as <varname>SHMMAX</varname>; if pages, <literal>ceil(SHMMAX/PAGE_SIZE)</literal></>
</row>
<row>
<row>
<entry><varname>SEMMNI</></>
<entry>Maximum number of semaphore identifiers (i.e., sets)</>
- <entry>>= ceil(max_connections / 16)</>
+ <entry><literal>>= ceil(max_connections / 16)</literal></>
</row>
<row>
<entry><varname>SEMMNS</></>
<entry>Maximum number of semaphores system-wide</>
- <entry>ceil(max_connections / 16) * 17 + room for other applications</>
+ <entry><literal>ceil(max_connections / 16) * 17</literal> + room for other applications</>
</row>
<row>
<variablelist>
<varlistentry>
- <term>BSD/OS</>
+ <term><systemitem class="osname">BSD/OS</></term>
<listitem>
<formalpara>
<title>Shared Memory</>
mind that shared memory is not pageable; it is locked in RAM.
To increase the number of shared buffers supported by the
- postmaster, add the following to your kernel config file. A
+ postmaster, add the following to your kernel configuration file. A
<varname>SHMALL</> value of 1024 represents 4MB of shared
memory. The following increases the maximum shared memory area
to 32 MB:
recompile the kernel, and reboot. For those running earlier
releases, use <application>bpatch</> to find the
<varname>sysptsize</> value in the current kernel. This is
- computed dynamically at bootup.
+ computed dynamically at boot time.
<screen>
$ <userinput>bpatch -r sysptsize</>
<computeroutput>0x9 = 9</>
</screen>
Next, add <varname>SYSPTSIZE</> as a hard-coded value in the
- kernel config file. Increase the value you found using
+ kernel configuration file. Increase the value you found using
<application>bpatch</>. Add 1 for every additional 4 MB of
shared memory you desire.
<programlisting>
options "SYSPTSIZE=16"
</programlisting>
- <varname>sysptsize</> can not be changed by sysctl.
+ <varname>sysptsize</> cannot be changed by <command>sysctl</command>.
</para>
<formalpara>
</formalpara>
<para>
- Set the values you want in your kernel config file, e.g.:
+ Set the values you want in your kernel configuration file, e.g.:
<programlisting>
options "SEMMNI=40"
options "SEMMNS=240"
<varlistentry>
- <term>FreeBSD</term>
- <term>NetBSD</term>
- <term>OpenBSD</term>
+ <term><systemitem class="osname">FreeBSD</></term>
+ <term><systemitem class="osname">NetBSD</></term>
+ <term><systemitem class="osname">OpenBSD</></term>
<listitem>
<para>
The options <varname>SYSVSHM</> and <varname>SYSVSEM</> need
options SEMMNU=256
options SEMMAP=256
</programlisting>
- (On NetBSD and OpenBSD the key word is actually
+ (On <systemitem class="osname">NetBSD</> and <systemitem
+ class="osname">OpenBSD</> the key word is actually
<literal>option</literal> singular.)
</para>
</listitem>
<varlistentry>
- <term>HP-UX</>
+ <term><systemitem class="osname">HP-UX</></term>
<listitem>
<para>
The default settings tend to suffice for normal installations.
database sites.
</para>
<para>
- IPC parameters can be set in the <application>System
+ <acronym>IPC</> parameters can be set in the <application>System
Administration Manager</> (<acronym>SAM</>) under
<menuchoice><guimenu>Kernel
Configuration</><guimenuitem>Configurable Parameters</></>.
<varlistentry>
- <term>Linux</>
+ <term><systemitem class="osname">Linux</></term>
<listitem>
<para>
The default shared memory limit (both
<varlistentry>
- <term>SCO OpenServer</>
+ <term><systemitem class="osname">SCO OpenServer</></term>
<listitem>
<para>
In the default configuration, only 512 kB of shared memory per
<varlistentry>
- <term>Solaris</>
+ <term><systemitem class="osname">Solaris</></term>
<listitem>
<para>
At least in version 2.6, the maximum size of a shared memory
<varlistentry>
- <term>UnixWare</>
+ <term><systemitem class="osname">UnixWare</></term>
<listitem>
<para>
On <productname>UnixWare</> 7, the maximum size for shared
call <function>setrlimit</function> is responsible for setting
these parameters. The shell's built-in command
<command>ulimit</command> (Bourne shells) or
- <command>limit</command> (csh) is used to control the resource
+ <command>limit</command> (<application>csh</>) is used to control the resource
limits from the command line. On BSD-derived systems the file
<filename>/etc/login.conf</filename> controls what values the
various resource limits are set to upon login. See
done by what signal you send to the server process.
<variablelist>
<varlistentry>
- <term>SIGTERM</term>
+ <term><systemitem>SIGTERM</systemitem></term>
<listitem>
<para>
- After receiving SIGTERM, the postmaster disallows new
+ After receiving <systemitem>SIGTERM</systemitem>, the postmaster disallows new
connections, but lets existing backends end their work normally.
It shuts down only after all of the backends terminate by client
request.
</varlistentry>
<varlistentry>
- <term>SIGINT</term>
+ <term><systemitem>SIGINT</systemitem></term>
<listitem>
<para>
The postmaster disallows new connections and sends all existing
- backends SIGTERM, which will cause them to abort their current
+ backends <systemitem>SIGTERM</systemitem>, which will cause them to abort their current
transactions and exit promptly. It then waits for the backends to exit
and finally shuts down the data base.
This is the <firstterm>Fast Shutdown</firstterm>.
</varlistentry>
<varlistentry>
- <term>SIGQUIT</term>
+ <term><systemitem>SIGQUIT</systemitem></term>
<listitem>
<para>
This is the <firstterm>Immediate Shutdown</firstterm> which
- will cause the postmaster to send a SIGQUIT to all backends and
+ will cause the postmaster to send a <systemitem>SIGQUIT</systemitem> to all backends and
exit immediately (without properly shutting down the database
system). The backends likewise exit immediately upon receiving
- SIGQUIT. This will lead to recovery (by replaying the WAL log)
+ <systemitem>SIGQUIT</systemitem>. This will lead to recovery (by replaying the WAL log)
upon next start-up. This is recommended only in emergencies.
</para>
</listitem>
<caution>
<para>
- It is best not to use SIGKILL to shut down the postmaster. This
+ It is best not to use <systemitem>SIGKILL</systemitem> to shut down the postmaster. This
will prevent the postmaster from releasing shared memory and
semaphores, which you may then have to do by hand.
</para>
</caution>
- The PID of the postmaster process can be found using the
+ The <acronym>PID</> of the postmaster process can be found using the
<application>ps</application> program, or from the file
<filename>postmaster.pid</filename> in the data directory. So for
example, to do a fast shutdown:
For details on how to create your server private key and certificate,
refer to the <productname>OpenSSL</> documentation. A simple self-signed
certificate can be used to get started for testing, but a certificate signed
- by a CA (either one of the global CAs or a local one) should be used in
+ by a <acronym>CA</> (either one of the global <acronym>CAs</> or a local one) should be used in
production so the client can verify the servers identity. To create
- a quick self-signed certificate, use the following OpenSSL command:
+ a quick self-signed certificate, use the following <productname>OpenSSL</productname> command:
<programlisting>
openssl req -new -text -out cert.req
</programlisting>
- Fill out the information that openssl asks for. Make sure that you enter
+ Fill out the information that <command>openssl</> asks for. Make sure that you enter
the local host name as Common Name; the challenge password can be
left blank. The script will generate a key that is passphrase protected;
it will not accept a pass phrase that is less than four characters long.
</sect1>
<sect1 id="ssh-tunnels">
- <title>Secure TCP/IP Connections with SSH tunnels</title>
+ <title>Secure TCP/IP Connections with <application>SSH</application> tunnels</title>
<indexterm zone="ssh-tunnels">
<primary>ssh</primary>
</para>
<para>
- First make sure that an <productname>ssh</productname> server is
+ First make sure that an <application>ssh</application> server is
running properly on the same machine as
<productname>Postgres</productname> and that you can log in using
- ssh as some user. Then you can establish a secure tunnel with a
+ <command>ssh</command> as some user. Then you can establish a secure tunnel with a
command like this from the client machine:
<programlisting>
> <userinput>ssh -L 3333:foo.com:5432 joe@foo.com</userinput>
To the database server it will then look as though you are really
user <literal>joe@foo.com</literal> and it will use whatever
authentication procedure was set up for this user. In order for the
- tunnel setup to succeed you must be allowed to connect via ssh as
- joe@foo.com, just as if you had attempted to use ssh to set up a
+ tunnel setup to succeed you must be allowed to connect via <command>ssh</command> as
+ <systemitem>joe@foo.com</systemitem>, just as if you had attempted to use <command>ssh</command> to set up a
terminal session.
</para>
<command>initdb</command>) it will have the same name as the
operating system user that initialized the area (and is presumably
being used as the user that runs the server). Customarily, this user
- will be called <quote>postgres</quote>. In order to create more
+ will be called <systemitem>postgres</systemitem>. In order to create more
users you have to first connect as this initial user.
</para>
<para>
When a database object is created, it is assigned an owner. The
owner is the user that executed the creation statement. There is
- currenty no polished interface for changing the owner of a database
+ currently no polished interface for changing the owner of a database
object. By default, only an owner (or a superuser) can do anything
with the object. In order to allow other users to use it,
<firstterm>privileges</firstterm> must be granted.
REVOKE ALL ON accounts FROM PUBLIC;
</programlisting>
The set of privileges held by the table owner is always implicit
- and is never revokable.
+ and cannot be revoked.
</para>
</sect1>
<para>
Functions and triggers allow users to insert code into the backend
server that other users may execute without knowing it. Hence, both
- mechanisms permit users to <firstterm>trojan horse</firstterm>
+ mechanisms permit users to <firstterm>Trojan horse</firstterm>
others with relative impunity. The only real protection is tight
control over who can define functions (e.g., write to relations
with SQL fields) and triggers. Audit trails and alerters on the
-<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.8 2001/08/25 18:52:41 tgl Exp $ -->
+<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.9 2001/09/09 23:52:12 petere Exp $ -->
<chapter id="wal">
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
The first obvious benefit of using <acronym>WAL</acronym> is a
significantly reduced number of disk writes, since only the log
file needs to be flushed to disk at the time of transaction
- commit; in multi-user environments, commits of many transactions
+ commit; in multiuser environments, commits of many transactions
may be accomplished with a single <function>fsync()</function> of
the log file. Furthermore, the log file is written sequentially,
and so the cost of syncing the log is much less than the cost of
record to the log with <function>LogInsert</function> but before
performing a <function>LogFlush</function>. This delay allows other
backends to add their commit records to the log so as to have all
- of them flushed with a single log sync. No sleep will occur if fsync
+ of them flushed with a single log sync. No sleep will occur if <varname>fsync</varname>
is not enabled or if fewer than <varname>COMMIT_SIBLINGS</varname>
other backends are not currently in active transactions; this avoids
sleeping when it's unlikely that any other backend will commit soon.