More minor updates and copy-editing.
This commit is contained in:
parent
31cc047d94
commit
7737d01ece
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.53 2004/12/13 18:05:07 petere Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.54 2004/12/28 19:08:58 tgl Exp $
|
||||||
-->
|
-->
|
||||||
<chapter id="backup">
|
<chapter id="backup">
|
||||||
<title>Backup and Restore</title>
|
<title>Backup and Restore</title>
|
||||||
@ -7,7 +7,7 @@ $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.53 2004/12/13 18:05:07 petere Ex
|
|||||||
<indexterm zone="backup"><primary>backup</></>
|
<indexterm zone="backup"><primary>backup</></>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As everything that contains valuable data, <productname>PostgreSQL</>
|
As with everything that contains valuable data, <productname>PostgreSQL</>
|
||||||
databases should be backed up regularly. While the procedure is
|
databases should be backed up regularly. While the procedure is
|
||||||
essentially simple, it is important to have a basic understanding of
|
essentially simple, it is important to have a basic understanding of
|
||||||
the underlying techniques and assumptions.
|
the underlying techniques and assumptions.
|
||||||
@ -46,9 +46,9 @@ pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable cl
|
|||||||
client application (albeit a particularly clever one). This means
|
client application (albeit a particularly clever one). This means
|
||||||
that you can do this backup procedure from any remote host that has
|
that you can do this backup procedure from any remote host that has
|
||||||
access to the database. But remember that <application>pg_dump</>
|
access to the database. But remember that <application>pg_dump</>
|
||||||
does not operate with special permissions. In particular, you must
|
does not operate with special permissions. In particular, it must
|
||||||
have read access to all tables that you want to back up, so in
|
have read access to all tables that you want to back up, so in
|
||||||
practice you almost always have to be a database superuser.
|
practice you almost always have to run it as a database superuser.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -111,26 +111,25 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
|
|||||||
command, you must create it yourself from <literal>template0</> before executing
|
command, you must create it yourself from <literal>template0</> before executing
|
||||||
<application>psql</> (e.g., with <literal>createdb -T template0
|
<application>psql</> (e.g., with <literal>createdb -T template0
|
||||||
<replaceable class="parameter">dbname</></literal>).
|
<replaceable class="parameter">dbname</></literal>).
|
||||||
<application>psql</> supports similar options to <application>pg_dump</>
|
<application>psql</> supports options similar to <application>pg_dump</>
|
||||||
for controlling the database server location and the user name. See
|
for controlling the database server location and the user name. See
|
||||||
its reference page for more information.
|
<xref linkend="app-psql">'s reference page for more information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If the objects in the original database were owned by different
|
Not only must the target database already exist before starting to
|
||||||
users, then the dump will instruct <application>psql</> to connect
|
run the restore, but so must all the users who own objects in the
|
||||||
as each affected user in turn and then create the relevant
|
dumped database or were granted permissions on the objects. If they
|
||||||
objects. This way the original ownership is preserved. This also
|
do not, then the restore will fail to recreate the objects with the
|
||||||
means, however, that all these users must already exist, and
|
original ownership and/or permissions. (Sometimes this is what you want,
|
||||||
furthermore that you must be allowed to connect as each of them.
|
but usually it is not.)
|
||||||
It might therefore be necessary to temporarily relax the client
|
|
||||||
authentication settings.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Once restored, it is wise to run <xref linkend="sql-analyze"
|
Once restored, it is wise to run <xref linkend="sql-analyze"
|
||||||
endterm="sql-analyze-title"> on each database so the optimizer has
|
endterm="sql-analyze-title"> on each database so the optimizer has
|
||||||
useful statistics. You can also run <command>vacuumdb -a -z</> to
|
useful statistics. An easy way to do this is to run
|
||||||
|
<command>vacuumdb -a -z</> to
|
||||||
<command>VACUUM ANALYZE</> all databases; this is equivalent to
|
<command>VACUUM ANALYZE</> all databases; this is equivalent to
|
||||||
running <command>VACUUM ANALYZE</command> manually.
|
running <command>VACUUM ANALYZE</command> manually.
|
||||||
</para>
|
</para>
|
||||||
@ -189,7 +188,7 @@ psql template1 < <replaceable class="parameter">infile</replaceable>
|
|||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="backup-dump-large">
|
<sect2 id="backup-dump-large">
|
||||||
<title>Large Databases</title>
|
<title>Handling large databases</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Since <productname>PostgreSQL</productname> allows tables larger
|
Since <productname>PostgreSQL</productname> allows tables larger
|
||||||
@ -249,17 +248,19 @@ cat <replaceable class="parameter">filename</replaceable>* | psql <replaceable c
|
|||||||
<formalpara>
|
<formalpara>
|
||||||
<title>Use the custom dump format.</title>
|
<title>Use the custom dump format.</title>
|
||||||
<para>
|
<para>
|
||||||
If <productname>PostgreSQL</productname> was built on a system with the <application>zlib</> compression library
|
If <productname>PostgreSQL</productname> was built on a system with the
|
||||||
installed, the custom dump format will compress data as it writes it
|
<application>zlib</> compression library installed, the custom dump
|
||||||
to the output file. For large databases, this will produce similar dump
|
format will compress data as it writes it to the output file. This will
|
||||||
sizes to using <command>gzip</command>, but has the added advantage that the tables can be
|
produce dump file sizes similar to using <command>gzip</command>, but it
|
||||||
restored selectively. The following command dumps a database using the
|
has the added advantage that tables can be restored selectively. The
|
||||||
custom dump format:
|
following command dumps a database using the custom dump format:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">filename</replaceable>
|
pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">filename</replaceable>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
|
A custom-format dump is not a script for <application>psql</>, but
|
||||||
|
instead must be restored with <application>pg_restore</>.
|
||||||
See the <xref linkend="app-pgdump"> and <xref
|
See the <xref linkend="app-pgdump"> and <xref
|
||||||
linkend="app-pgrestore"> reference pages for details.
|
linkend="app-pgrestore"> reference pages for details.
|
||||||
</para>
|
</para>
|
||||||
@ -276,7 +277,8 @@ pg_dump -Fc <replaceable class="parameter">dbname</replaceable> > <replaceable c
|
|||||||
object</primary><secondary>backup</secondary></indexterm> To dump
|
object</primary><secondary>backup</secondary></indexterm> To dump
|
||||||
large objects you must use either the custom or the tar output
|
large objects you must use either the custom or the tar output
|
||||||
format, and use the <option>-b</> option in
|
format, and use the <option>-b</> option in
|
||||||
<application>pg_dump</>. See the reference pages for details. The
|
<application>pg_dump</>. See the <xref linkend="app-pgdump"> reference
|
||||||
|
page for details. The
|
||||||
directory <filename>contrib/pg_dumplo</> of the
|
directory <filename>contrib/pg_dumplo</> of the
|
||||||
<productname>PostgreSQL</> source tree also contains a program
|
<productname>PostgreSQL</> source tree also contains a program
|
||||||
that can dump large objects.
|
that can dump large objects.
|
||||||
@ -366,7 +368,9 @@ tar -cf backup.tar /usr/local/pgsql/data
|
|||||||
data files and WAL log on different disks) there may not be any way
|
data files and WAL log on different disks) there may not be any way
|
||||||
to obtain exactly-simultaneous frozen snapshots of all the volumes.
|
to obtain exactly-simultaneous frozen snapshots of all the volumes.
|
||||||
Read your file system documentation very carefully before trusting
|
Read your file system documentation very carefully before trusting
|
||||||
to the consistent-snapshot technique in such situations.
|
to the consistent-snapshot technique in such situations. The safest
|
||||||
|
approach is to shut down the database server for long enough to
|
||||||
|
establish all the frozen snapshots.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -616,9 +620,12 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
|
|||||||
modifications made to the data in your <productname>PostgreSQL</> database
|
modifications made to the data in your <productname>PostgreSQL</> database
|
||||||
it will not restore changes made to configuration files (that is,
|
it will not restore changes made to configuration files (that is,
|
||||||
<filename>postgresql.conf</>, <filename>pg_hba.conf</> and
|
<filename>postgresql.conf</>, <filename>pg_hba.conf</> and
|
||||||
<filename>pg_ident.conf</>) after the initial base backup.
|
<filename>pg_ident.conf</>), since those are edited manually rather
|
||||||
|
than through SQL operations.
|
||||||
You may wish to keep the configuration files in a location that will
|
You may wish to keep the configuration files in a location that will
|
||||||
be backed up by your regular file system backup procedures.
|
be backed up by your regular file system backup procedures. See
|
||||||
|
<xref linkend="runtime-config-file-locations"> for how to relocate the
|
||||||
|
configuration files.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
@ -930,8 +937,8 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
|
|||||||
in the command.
|
in the command.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
It is important for the command to return a zero exit status only
|
It is important for the command to return a zero exit status if and
|
||||||
if it succeeds. The command <emphasis>will</> be asked for file
|
only if it succeeds. The command <emphasis>will</> be asked for file
|
||||||
names that are not present in the archive; it must return nonzero
|
names that are not present in the archive; it must return nonzero
|
||||||
when so asked. Examples:
|
when so asked. Examples:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@ -1083,7 +1090,7 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
|
|||||||
that was current when the base backup was taken. If you want to recover
|
that was current when the base backup was taken. If you want to recover
|
||||||
into some child timeline (that is, you want to return to some state that
|
into some child timeline (that is, you want to return to some state that
|
||||||
was itself generated after a recovery attempt), you need to specify the
|
was itself generated after a recovery attempt), you need to specify the
|
||||||
target timeline in <filename>recovery.conf</>. You cannot recover into
|
target timeline ID in <filename>recovery.conf</>. You cannot recover into
|
||||||
timelines that branched off earlier than the base backup.
|
timelines that branched off earlier than the base backup.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
@ -1131,6 +1138,13 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
|
|||||||
<secondary>compatibility</secondary>
|
<secondary>compatibility</secondary>
|
||||||
</indexterm>
|
</indexterm>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This section discusses how to migrate your database data from one
|
||||||
|
<productname>PostgreSQL</> release to a newer one.
|
||||||
|
The software installation procedure <foreignphrase>per se</> is not the
|
||||||
|
subject of this section; those details are in <xref linkend="installation">.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As a general rule, the internal data storage format is subject to
|
As a general rule, the internal data storage format is subject to
|
||||||
change between major releases of <productname>PostgreSQL</> (where
|
change between major releases of <productname>PostgreSQL</> (where
|
||||||
@ -1140,17 +1154,21 @@ restore_command = 'copy /mnt/server/archivedir/%f "%p"' # Windows
|
|||||||
storage formats. For example, releases 7.0.1, 7.1.2, and 7.2 are
|
storage formats. For example, releases 7.0.1, 7.1.2, and 7.2 are
|
||||||
not compatible, whereas 7.1.1 and 7.1.2 are. When you update
|
not compatible, whereas 7.1.1 and 7.1.2 are. When you update
|
||||||
between compatible versions, you can simply replace the executables
|
between compatible versions, you can simply replace the executables
|
||||||
and reuse the data area on disk. Otherwise you need to <quote>back
|
and reuse the data directory on disk. Otherwise you need to back
|
||||||
up</> your data and <quote>restore</> it on the new server, using
|
up your data and restore it on the new server. This has to be done
|
||||||
<application>pg_dump</>. There are checks in place that prevent you
|
using <application>pg_dump</>; file system level backup methods
|
||||||
from using a data area with an incompatible version of
|
obviously won't work. There are checks in place that prevent you
|
||||||
<productname>PostgreSQL</productname>, so no harm can be done by
|
from using a data directory with an incompatible version of
|
||||||
confusing these things. It is recommended that you use the
|
<productname>PostgreSQL</productname>, so no great harm can be done by
|
||||||
<application>pg_dump</> program from the newer version of
|
trying to start the wrong server version on a data directory.
|
||||||
<productname>PostgreSQL</> to take advantage of any enhancements in
|
</para>
|
||||||
<application>pg_dump</> that may have been made. The precise
|
|
||||||
installation procedure is not the subject of this section; those
|
<para>
|
||||||
details are in <xref linkend="installation">.
|
It is recommended that you use the <application>pg_dump</> and
|
||||||
|
<application>pg_dumpall</> programs from the newer version of
|
||||||
|
<productname>PostgreSQL</>, to take advantage of any enhancements
|
||||||
|
that may have been made in these programs. Current releases of the
|
||||||
|
dump programs can read data from any server version back to 7.0.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1165,11 +1183,17 @@ pg_dumpall -p 5432 | psql -d template1 -p 6543
|
|||||||
to transfer your data. Or use an intermediate file if you want.
|
to transfer your data. Or use an intermediate file if you want.
|
||||||
Then you can shut down the old server and start the new server at
|
Then you can shut down the old server and start the new server at
|
||||||
the port the old one was running at. You should make sure that the
|
the port the old one was running at. You should make sure that the
|
||||||
database is not updated after you run <application>pg_dumpall</>,
|
old database is not updated after you run <application>pg_dumpall</>,
|
||||||
otherwise you will obviously lose that data. See <xref
|
otherwise you will obviously lose that data. See <xref
|
||||||
linkend="client-authentication"> for information on how to prohibit
|
linkend="client-authentication"> for information on how to prohibit
|
||||||
access. In practice you probably want to test your client
|
access.
|
||||||
applications on the new setup before switching over.
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In practice you probably want to test your client
|
||||||
|
applications on the new setup before switching over completely.
|
||||||
|
This is another reason for setting up concurrent installations
|
||||||
|
of old and new versions.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -1194,22 +1218,16 @@ psql template1 < backup
|
|||||||
you of strategic places to perform these steps.
|
you of strategic places to perform these steps.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
You will always need a SQL dump (<application>pg_dump</> dump) for
|
|
||||||
migrating to a new release. File-system-level backups (including
|
|
||||||
on-line backups) will not work, for the same reason that you can't
|
|
||||||
just do the update in-place: the file formats won't necessarily be
|
|
||||||
compatible across major releases.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
When you <quote>move the old installation out of the way</quote>
|
When you <quote>move the old installation out of the way</quote>
|
||||||
it is no longer perfectly usable. Some parts of the installation
|
it may no longer be perfectly usable. Some of the executable programs
|
||||||
contain information about where the other parts are located. This
|
contain absolute paths to various installed programs and data files.
|
||||||
is usually not a big problem but if you plan on using two
|
This is usually not a big problem but if you plan on using two
|
||||||
installations in parallel for a while you should assign them
|
installations in parallel for a while you should assign them
|
||||||
different installation directories at build time.
|
different installation directories at build time. (This problem
|
||||||
|
is rectified in <productname>PostgreSQL</> 8.0 and later, but you
|
||||||
|
need to be wary of moving older installations.)
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.12 2004/12/01 19:00:27 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.13 2004/12/28 19:08:58 tgl Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="diskusage">
|
<chapter id="diskusage">
|
||||||
@ -24,7 +24,10 @@ $PostgreSQL: pgsql/doc/src/sgml/diskusage.sgml,v 1.12 2004/12/01 19:00:27 tgl Ex
|
|||||||
which is used to store values too wide to fit comfortably in the main
|
which is used to store values too wide to fit comfortably in the main
|
||||||
table. There will be one index on the
|
table. There will be one index on the
|
||||||
<acronym>TOAST</> table, if present. There may also be indexes associated
|
<acronym>TOAST</> table, if present. There may also be indexes associated
|
||||||
with the base table.
|
with the base table. Each table and index is stored in a separate disk
|
||||||
|
file — possibly more than one file, if the file would exceed one
|
||||||
|
gigabyte. Naming conventions for these files are described in <xref
|
||||||
|
linkend="file-layout">.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -135,6 +138,13 @@ SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
|
|||||||
not wait until the disk is completely full to take action.
|
not wait until the disk is completely full to take action.
|
||||||
</para>
|
</para>
|
||||||
</tip>
|
</tip>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If your system supports per-user disk quotas, then the database
|
||||||
|
will naturally be subject to whatever quota is placed on the user
|
||||||
|
the server runs as. Exceeding the quota will have the same bad
|
||||||
|
effects as running out of space entirely.
|
||||||
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.26 2004/03/26 03:18:28 neilc Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.27 2004/12/28 19:08:58 tgl Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="monitoring">
|
<chapter id="monitoring">
|
||||||
@ -26,7 +26,8 @@ $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.26 2004/03/26 03:18:28 neilc
|
|||||||
analyzing performance. Most of this chapter is devoted to describing
|
analyzing performance. Most of this chapter is devoted to describing
|
||||||
<productname>PostgreSQL</productname>'s statistics collector,
|
<productname>PostgreSQL</productname>'s statistics collector,
|
||||||
but one should not neglect regular Unix monitoring programs such as
|
but one should not neglect regular Unix monitoring programs such as
|
||||||
<command>ps</> and <command>top</>. Also, once one has identified a
|
<command>ps</>, <command>top</>, <command>iostat</>, and <command>vmstat</>.
|
||||||
|
Also, once one has identified a
|
||||||
poorly-performing query, further investigation may be needed using
|
poorly-performing query, further investigation may be needed using
|
||||||
<productname>PostgreSQL</productname>'s <xref linkend="sql-explain"
|
<productname>PostgreSQL</productname>'s <xref linkend="sql-explain"
|
||||||
endterm="sql-explain-title"> command.
|
endterm="sql-explain-title"> command.
|
||||||
@ -172,25 +173,28 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
|||||||
<title>Viewing Collected Statistics</Title>
|
<title>Viewing Collected Statistics</Title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Several predefined views are available to show the results of
|
Several predefined views, listed in <xref
|
||||||
statistics collection, listed in <xref
|
linkend="monitoring-stats-views-table">, are available to show the results
|
||||||
linkend="monitoring-stats-views-table">. Alternatively, one can
|
of statistics collection. Alternatively, one can
|
||||||
build custom views using the underlying statistics functions.
|
build custom views using the underlying statistics functions.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When using the statistics to monitor current activity, it is important
|
When using the statistics to monitor current activity, it is important
|
||||||
to realize that the information does not update instantaneously.
|
to realize that the information does not update instantaneously.
|
||||||
Each individual server process transmits new access counts to the collector
|
Each individual server process transmits new block and row access counts to
|
||||||
just before waiting for another client command; so a query still in
|
the collector just before going idle; so a query or transaction still in
|
||||||
progress does not affect the displayed totals. Also, the collector itself
|
progress does not affect the displayed totals. Also, the collector itself
|
||||||
emits new totals at most once per <varname>pgstat_stat_interval</varname> milliseconds
|
emits a new report at most once per <varname>pgstat_stat_interval</varname>
|
||||||
(500 by default). So the displayed totals lag behind actual activity.
|
milliseconds (500 by default). So the displayed information lags behind
|
||||||
|
actual activity. Current-query information is reported to the collector
|
||||||
|
immediately, but is still subject to the
|
||||||
|
<varname>pgstat_stat_interval</varname> delay before it becomes visible.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Another important point is that when a server process is asked to display
|
Another important point is that when a server process is asked to display
|
||||||
any of these statistics, it first fetches the most recent totals emitted by
|
any of these statistics, it first fetches the most recent report emitted by
|
||||||
the collector process and then continues to use this snapshot for all
|
the collector process and then continues to use this snapshot for all
|
||||||
statistical views and functions until the end of its current transaction.
|
statistical views and functions until the end of its current transaction.
|
||||||
So the statistics will appear not to change as long as you continue the
|
So the statistics will appear not to change as long as you continue the
|
||||||
@ -614,7 +618,7 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS procpid,
|
|||||||
database administrator to view information about the outstanding
|
database administrator to view information about the outstanding
|
||||||
locks in the lock manager. For example, this capability can be used
|
locks in the lock manager. For example, this capability can be used
|
||||||
to:
|
to:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.44 2004/12/03 17:46:19 tgl Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.45 2004/12/28 19:08:58 tgl Exp $ -->
|
||||||
|
|
||||||
<chapter id="regress">
|
<chapter id="regress">
|
||||||
<title id="regress-title">Regression Tests</title>
|
<title id="regress-title">Regression Tests</title>
|
||||||
@ -15,16 +15,14 @@
|
|||||||
The regression tests are a comprehensive set of tests for the SQL
|
The regression tests are a comprehensive set of tests for the SQL
|
||||||
implementation in <productname>PostgreSQL</productname>. They test
|
implementation in <productname>PostgreSQL</productname>. They test
|
||||||
standard SQL operations as well as the extended capabilities of
|
standard SQL operations as well as the extended capabilities of
|
||||||
<productname>PostgreSQL</productname>. From
|
<productname>PostgreSQL</productname>.
|
||||||
<productname>PostgreSQL</productname> 6.1 onward, the regression
|
|
||||||
tests are current for every official release.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<sect1 id="regress-run">
|
<sect1 id="regress-run">
|
||||||
<title>Running the Tests</title>
|
<title>Running the Tests</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The regression test can be run against an already installed and
|
The regression tests can be run against an already installed and
|
||||||
running server, or using a temporary installation within the build
|
running server, or using a temporary installation within the build
|
||||||
tree. Furthermore, there is a <quote>parallel</quote> and a
|
tree. Furthermore, there is a <quote>parallel</quote> and a
|
||||||
<quote>sequential</quote> mode for running the tests. The
|
<quote>sequential</quote> mode for running the tests. The
|
||||||
@ -51,12 +49,13 @@ gmake check
|
|||||||
<screen>
|
<screen>
|
||||||
<computeroutput>
|
<computeroutput>
|
||||||
======================
|
======================
|
||||||
All 93 tests passed.
|
All 96 tests passed.
|
||||||
======================
|
======================
|
||||||
</computeroutput>
|
</computeroutput>
|
||||||
</screen>
|
</screen>
|
||||||
or otherwise a note about which tests failed. See <xref
|
or otherwise a note about which tests failed. See <xref
|
||||||
linkend="regress-evaluation"> below for more.
|
linkend="regress-evaluation"> below before assuming that a
|
||||||
|
<quote>failure</> represents a serious problem.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -130,10 +129,14 @@ gmake SHELL=/bin/ksh check
|
|||||||
server, <![%standalone-ignore;[as explained in <xref linkend="runtime">, ]]> then type
|
server, <![%standalone-ignore;[as explained in <xref linkend="runtime">, ]]> then type
|
||||||
<screen>
|
<screen>
|
||||||
gmake installcheck
|
gmake installcheck
|
||||||
|
</screen>
|
||||||
|
or for a parallel test
|
||||||
|
<screen>
|
||||||
|
gmake installcheck-parallel
|
||||||
</screen>
|
</screen>
|
||||||
The tests will expect to contact the server at the local host and the
|
The tests will expect to contact the server at the local host and the
|
||||||
default port number, unless directed otherwise by <envar>PGHOST</envar> and <envar>PGPORT</envar>
|
default port number, unless directed otherwise by <envar>PGHOST</envar> and
|
||||||
environment variables.
|
<envar>PGPORT</envar> environment variables.
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -323,7 +326,7 @@ exclusion of those that don't.
|
|||||||
diff results/random.out expected/random.out
|
diff results/random.out expected/random.out
|
||||||
</programlisting>
|
</programlisting>
|
||||||
should produce only one or a few lines of differences. You need
|
should produce only one or a few lines of differences. You need
|
||||||
not worry unless the random test repeatedly fails.
|
not worry unless the random test fails repeatedly.
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user