Commit d07454f5 authored by Peter Eisentraut's avatar Peter Eisentraut

Markup additions and spell check. (covers Admin Guide)

parent 84956e71
<!-- $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"> <chapter id="backup">
<title>Backup and Restore</title> <title>Backup and Restore</title>
...@@ -236,10 +236,10 @@ cat <replaceable class="parameter">filename</replaceable>.* | psql <replaceable ...@@ -236,10 +236,10 @@ cat <replaceable class="parameter">filename</replaceable>.* | psql <replaceable
<formalpara> <formalpara>
<title>Use the custom dump format (V7.1).</title> <title>Use the custom dump format (V7.1).</title>
<para> <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 installed, the custom dump format will compress data as it writes it
to the output file. For large databases, this will produce similar dump 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 restored selectively. The following command dumps a database using the
custom dump format: custom dump format:
......
This diff is collapsed.
This diff is collapsed.
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Windows. The makefiles included in the source distribution are Windows. The makefiles included in the source distribution are
written for <productname>Microsoft Visual C++</productname> and will written for <productname>Microsoft Visual C++</productname> and will
probably not work with other systems. It should be possible to 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> </para>
<tip> <tip>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</para> </para>
<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 have to add the <filename>src\include</filename> and
<filename>src\interfaces\libpq</filename> subdirectories of the <filename>src\interfaces\libpq</filename> subdirectories of the
source tree to the include path in your compilers settings. source tree to the include path in your compilers settings.
......
This diff is collapsed.
<!-- <!--
$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"> <chapter id="maintenance">
...@@ -94,7 +94,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34 ...@@ -94,7 +94,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34
In normal <productname>PostgreSQL</productname> operation, an UPDATE or In normal <productname>PostgreSQL</productname> operation, an UPDATE or
DELETE of a row does not immediately remove the old <firstterm>tuple</> DELETE of a row does not immediately remove the old <firstterm>tuple</>
(version of the row). This approach is necessary to gain the benefits (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 must not be deleted while
it is still potentially visible to other transactions. But eventually, it is still potentially visible to other transactions. But eventually,
an outdated or deleted tuple is no longer of interest to any transaction. an outdated or deleted tuple is no longer of interest to any transaction.
...@@ -106,7 +106,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34 ...@@ -106,7 +106,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34
<para> <para>
Clearly, a table that receives frequent updates or deletes will need Clearly, a table that receives frequent updates or deletes will need
to be vacuumed more often than tables that are seldom updated. It may 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 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 to be helpful if you have both large heavily-updated tables and large
seldom-updated tables --- the extra cost of vacuuming a small table seldom-updated tables --- the extra cost of vacuuming a small table
...@@ -170,7 +170,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34 ...@@ -170,7 +170,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34
statistics updates if the statistical distribution of the data is not statistics updates if the statistical distribution of the data is not
changing much. A simple rule of thumb is to think about how much 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. 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 will have a constantly-increasing maximum value as rows are added and
updated; such a column will probably need more frequent statistics updated; such a column will probably need more frequent statistics
updates than, say, a column containing URLs for pages accessed on a updates than, say, a column containing URLs for pages accessed on a
...@@ -233,12 +233,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34 ...@@ -233,12 +233,12 @@ $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.2 2001/08/27 23:42:34
<para> <para>
Prior to <productname>PostgreSQL</productname> 7.2, the only defense 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 transactions. This of course was not very satisfactory for high-traffic
sites, so a better solution has been devised. The new approach allows an 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: 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>. billion transactions</emphasis>.
</para> </para>
...@@ -342,7 +342,7 @@ VACUUM ...@@ -342,7 +342,7 @@ VACUUM
user-created databases that are to be marked <literal>datallowconn</> = user-created databases that are to be marked <literal>datallowconn</> =
<literal>false</> in <filename>pg_database</>, since there isn't any <literal>false</> in <filename>pg_database</>, since there isn't any
convenient way to vacuum a database that you can't connect to. Note 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</> = ignore <filename>pg_database</> entries with <literal>datallowconn</> =
<literal>false</>, so as to avoid giving false warnings about these <literal>false</>, so as to avoid giving false warnings about these
databases; therefore it's up to you to ensure that such databases are 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"> <chapter id="managing-databases">
...@@ -85,11 +85,11 @@ CREATE DATABASE <replaceable>name</> ...@@ -85,11 +85,11 @@ CREATE DATABASE <replaceable>name</>
createdb <replaceable class="parameter">dbname</replaceable> createdb <replaceable class="parameter">dbname</replaceable>
</synopsis> </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, database and executes the <command>CREATE DATABASE</> command,
exactly as described above. It uses <application>psql</> program exactly as described above. It uses <application>psql</> program
internally. The reference page on createdb contains the invocation internally. The reference page on <command>createdb</> contains the invocation
details. In particular, createdb without any arguments will create details. In particular, <command>createdb</> without any arguments will create
a database with the current user name, which may or may not be what a database with the current user name, which may or may not be what
you want. you want.
</para> </para>
...@@ -132,7 +132,7 @@ export PGDATA2 ...@@ -132,7 +132,7 @@ export PGDATA2
setenv PGDATA2 /home/postgres/data setenv PGDATA2 /home/postgres/data
</programlisting> </programlisting>
</informalexample> </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 variable is always defined in the server environment, otherwise
you won't be able to access that database. Therefore you probably 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 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"> <chapter id="regress">
<title id="regress-title">Regression Tests</title> <title id="regress-title">Regression Tests</title>
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<prompt>$ </prompt><userinput>gmake installcheck</userinput> <prompt>$ </prompt><userinput>gmake installcheck</userinput>
</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 PGHOST and PGPORT default port number, unless directed otherwise by <envar>PGHOST</envar> and <envar>PGPORT</envar>
environment variables. environment variables.
</para> </para>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
<title>Date and time differences</title> <title>Date and time differences</title>
<para> <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 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 changeover, or the day before or after one. These queries assume
that the intervals between midnight yesterday, midnight today and that the intervals between midnight yesterday, midnight today and
...@@ -189,21 +189,21 @@ ...@@ -189,21 +189,21 @@
<para> <para>
Most of the date and time results are dependent on the time zone Most of the date and time results are dependent on the time zone
environment. The reference files are generated for 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. failures if the tests are not run with that time zone setting.
The regression test driver sets environment variable The regression test driver sets environment variable
<envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally <envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
ensures proper results. However, your system must provide library 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 tests will fail. To verify that your machine does have this
support, type the following: support, type the following:
<screen> <screen>
<prompt>$ </prompt><userinput>env TZ=PST8PDT date</userinput> <prompt>$ </prompt><userinput>env TZ=PST8PDT date</userinput>
</screen> </screen>
The command above should have returned the current system time in 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 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: rules explicitly:
<programlisting> <programlisting>
PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ
...@@ -220,7 +220,7 @@ PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ ...@@ -220,7 +220,7 @@ PGTZ='PST8PDT7,M04.01.0,M10.05.03'; export PGTZ
<para> <para>
Some systems using older time zone libraries fail to apply Some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing 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. result in localized differences in the test results.
</para> </para>
</sect2> </sect2>
...@@ -300,7 +300,7 @@ ORDER BY to that particular query and thereby eliminate the bogus ...@@ -300,7 +300,7 @@ ORDER BY to that particular query and thereby eliminate the bogus
</para> </para>
<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 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 make the regression tests less useful, not more, since they'd tend
to exercise query plan types that produce ordered results to the to exercise query plan types that produce ordered results to the
...@@ -352,7 +352,7 @@ testname/platformpattern=comparisonfilename ...@@ -352,7 +352,7 @@ testname/platformpattern=comparisonfilename
</synopsis> </synopsis>
The test name is just the name of the particular regression test The test name is just the name of the particular regression test
module. The platform pattern is a pattern in the style of 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 <literal>^</literal> anchor
at the start). It is matched against the platform name as printed at the start). It is matched against the platform name as printed
by <filename>config.guess</filename> followed by by <filename>config.guess</filename> followed by
...@@ -365,19 +365,19 @@ testname/platformpattern=comparisonfilename ...@@ -365,19 +365,19 @@ testname/platformpattern=comparisonfilename
<para> <para>
For example: some systems using older time zone libraries fail to apply For example: some systems using older time zone libraries fail to apply
daylight-savings corrections to dates before 1970, causing 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. few differences in the <filename>horology</> regression test.
Therefore, we provide a variant comparison file, Therefore, we provide a variant comparison file,
<filename>horology-no-DST-before-1970.out</filename>, which includes <filename>horology-no-DST-before-1970.out</filename>, which includes
the results to be expected on these systems. To silence the bogus 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 includes
<programlisting> <programlisting>
horology/hppa=horology-no-DST-before-1970 horology/hppa=horology-no-DST-before-1970
</programlisting> </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 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. platforms where it's appropriate.
</para> </para>
......
This diff is collapsed.
This diff is collapsed.
...@@ -39,7 +39,7 @@ CREATE USER <replaceable>name</replaceable> ...@@ -39,7 +39,7 @@ CREATE USER <replaceable>name</replaceable>
<command>initdb</command>) it will have the same name as the <command>initdb</command>) it will have the same name as the
operating system user that initialized the area (and is presumably operating system user that initialized the area (and is presumably
being used as the user that runs the server). Customarily, this user 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. users you have to first connect as this initial user.
</para> </para>
...@@ -132,7 +132,7 @@ ALTER GROUP <replaceable>name</replaceable> DROP USER <replaceable>uname1</repla ...@@ -132,7 +132,7 @@ ALTER GROUP <replaceable>name</replaceable> DROP USER <replaceable>uname1</repla
<para> <para>
When a database object is created, it is assigned an owner. The When a database object is created, it is assigned an owner. The
owner is the user that executed the creation statement. There is 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 object. By default, only an owner (or a superuser) can do anything
with the object. In order to allow other users to use it, with the object. In order to allow other users to use it,
<firstterm>privileges</firstterm> must be granted. <firstterm>privileges</firstterm> must be granted.
...@@ -169,7 +169,7 @@ GRANT SELECT ON accounts TO GROUP staff; ...@@ -169,7 +169,7 @@ GRANT SELECT ON accounts TO GROUP staff;
REVOKE ALL ON accounts FROM PUBLIC; REVOKE ALL ON accounts FROM PUBLIC;
</programlisting> </programlisting>
The set of privileges held by the table owner is always implicit The set of privileges held by the table owner is always implicit
and is never revokable. and cannot be revoked.
</para> </para>
</sect1> </sect1>
...@@ -179,7 +179,7 @@ REVOKE ALL ON accounts FROM PUBLIC; ...@@ -179,7 +179,7 @@ REVOKE ALL ON accounts FROM PUBLIC;
<para> <para>
Functions and triggers allow users to insert code into the backend Functions and triggers allow users to insert code into the backend
server that other users may execute without knowing it. Hence, both 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 others with relative impunity. The only real protection is tight
control over who can define functions (e.g., write to relations control over who can define functions (e.g., write to relations
with SQL fields) and triggers. Audit trails and alerters on the 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"> <chapter id="wal">
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title> <title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
The first obvious benefit of using <acronym>WAL</acronym> is a The first obvious benefit of using <acronym>WAL</acronym> is a
significantly reduced number of disk writes, since only the log significantly reduced number of disk writes, since only the log
file needs to be flushed to disk at the time of transaction 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 may be accomplished with a single <function>fsync()</function> of
the log file. Furthermore, the log file is written sequentially, 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 and so the cost of syncing the log is much less than the cost of
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
record to the log with <function>LogInsert</function> but before record to the log with <function>LogInsert</function> but before
performing a <function>LogFlush</function>. This delay allows other performing a <function>LogFlush</function>. This delay allows other
backends to add their commit records to the log so as to have all 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> is not enabled or if fewer than <varname>COMMIT_SIBLINGS</varname>
other backends are not currently in active transactions; this avoids other backends are not currently in active transactions; this avoids
sleeping when it's unlikely that any other backend will commit soon. sleeping when it's unlikely that any other backend will commit soon.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment