Fix and improve several places in the docs
This adds some missing markups, fixes a couple of incorrect ones and clarifies some documentation in various places. Author: Liudmila Mantrova Discussion: https://postgr.es/m/a068f947-7a51-5df1-b3fd-1a131ae5c044@postgrespro.ru Backpatch-through: 12
This commit is contained in:
parent
cee976c4e8
commit
de14e54d7b
@ -962,10 +962,10 @@ SELECT * FROM pg_stop_backup(false, true);
|
|||||||
The process for an exclusive backup is mostly the same as for a
|
The process for an exclusive backup is mostly the same as for a
|
||||||
non-exclusive one, but it differs in a few key steps. This type of
|
non-exclusive one, but it differs in a few key steps. This type of
|
||||||
backup can only be taken on a primary and does not allow concurrent
|
backup can only be taken on a primary and does not allow concurrent
|
||||||
backups. Moreover, because it writes a backup_label file on the
|
backups. Moreover, because it creates a backup label file, as
|
||||||
master, it can cause the master to fail to restart automatically after
|
described below, it can block automatic restart of the master server
|
||||||
a crash. On the other hand, the erroneous removal of a backup_label
|
after a crash. On the other hand, the erroneous removal of this
|
||||||
file from a backup or standby is a common mistake which can result
|
file from a backup or standby is a common mistake, which can result
|
||||||
in serious data corruption. If it is necessary to use this method,
|
in serious data corruption. If it is necessary to use this method,
|
||||||
the following steps may be used.
|
the following steps may be used.
|
||||||
</para>
|
</para>
|
||||||
@ -1025,10 +1025,10 @@ SELECT pg_start_backup('label', true);
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
As noted above, if the server crashes during the backup it may not be
|
As noted above, if the server crashes during the backup it may not be
|
||||||
possible to restart until the <literal>backup_label</literal> file has
|
possible to restart until the <filename>backup_label</filename> file has
|
||||||
been manually deleted from the <envar>PGDATA</envar> directory. Note
|
been manually deleted from the <envar>PGDATA</envar> directory. Note
|
||||||
that it is very important to never remove the
|
that it is very important to never remove the
|
||||||
<literal>backup_label</literal> file when restoring a backup, because
|
<filename>backup_label</filename> file when restoring a backup, because
|
||||||
this will result in corruption. Confusion about when it is appropriate
|
this will result in corruption. Confusion about when it is appropriate
|
||||||
to remove this file is a common cause of data corruption when using this
|
to remove this file is a common cause of data corruption when using this
|
||||||
method; be very certain that you remove the file only on an existing
|
method; be very certain that you remove the file only on an existing
|
||||||
@ -1075,7 +1075,7 @@ SELECT pg_stop_backup();
|
|||||||
lack of disk space, failure to call <function>pg_stop_backup</function>
|
lack of disk space, failure to call <function>pg_stop_backup</function>
|
||||||
will leave the server in backup mode indefinitely, causing future backups
|
will leave the server in backup mode indefinitely, causing future backups
|
||||||
to fail and increasing the risk of a restart failure during the time that
|
to fail and increasing the risk of a restart failure during the time that
|
||||||
<literal>backup_label</literal> exists.
|
<filename>backup_label</filename> exists.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
|
@ -137,14 +137,11 @@
|
|||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|
||||||
<biblioentry id="sqltr-19075-6">
|
<biblioentry id="sqltr-19075-6">
|
||||||
<title>SQL Technical Report</title>
|
<title><ulink url="http://standards.iso.org/ittf/PubliclyAvailableStandards/c067367_ISO_IEC_TR_19075-6_2017.zip">SQL Technical Report</ulink></title>
|
||||||
<subtitle>Part 6: SQL support for JavaScript Object
|
<subtitle>Part 6: SQL support for JavaScript Object
|
||||||
Notation (JSON)</subtitle>
|
Notation (JSON)</subtitle>
|
||||||
<edition>First Edition.</edition>
|
<edition>First Edition</edition>
|
||||||
<biblioid>
|
<pubdate>2017</pubdate>
|
||||||
<ulink url="http://standards.iso.org/ittf/PubliclyAvailableStandards/c067367_ISO_IEC_TR_19075-6_2017.zip"></ulink>.
|
|
||||||
</biblioid>
|
|
||||||
<pubdate>2017.</pubdate>
|
|
||||||
</biblioentry>
|
</biblioentry>
|
||||||
|
|
||||||
</bibliodiv>
|
</bibliodiv>
|
||||||
|
@ -227,8 +227,8 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Backward compatibility syntax for removing the <literal>oid</literal>
|
Backward compatibility syntax for removing the <literal>oid</literal>
|
||||||
system column. As oid system columns cannot be added anymore, this never
|
system column. As <literal>oid</literal> system columns cannot be added
|
||||||
has an effect.
|
anymore, this never has an effect.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -120,7 +120,7 @@ PostgreSQL documentation
|
|||||||
to be written safely to disk. This option causes
|
to be written safely to disk. This option causes
|
||||||
<command>pg_checksums</command> to return without waiting, which is
|
<command>pg_checksums</command> to return without waiting, which is
|
||||||
faster, but means that a subsequent operating system crash can leave
|
faster, but means that a subsequent operating system crash can leave
|
||||||
the updated data folder corrupt. Generally, this option is useful
|
the updated data directory corrupt. Generally, this option is useful
|
||||||
for testing but should not be used on a production installation.
|
for testing but should not be used on a production installation.
|
||||||
This option has no effect when using <literal>--check</literal>.
|
This option has no effect when using <literal>--check</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
@ -749,7 +749,7 @@ PostgreSQL documentation
|
|||||||
<term><option>--extra-float-digits=<replaceable class="parameter">ndigits</replaceable></option></term>
|
<term><option>--extra-float-digits=<replaceable class="parameter">ndigits</replaceable></option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use the specified value of extra_float_digits when dumping
|
Use the specified value of <option>extra_float_digits</option> when dumping
|
||||||
floating-point data, instead of the maximum available precision.
|
floating-point data, instead of the maximum available precision.
|
||||||
Routine dumps made for backup purposes should not use this option.
|
Routine dumps made for backup purposes should not use this option.
|
||||||
</para>
|
</para>
|
||||||
|
@ -184,7 +184,7 @@ PostgreSQL documentation
|
|||||||
to be written safely to disk. This option causes
|
to be written safely to disk. This option causes
|
||||||
<command>pg_rewind</command> to return without waiting, which is
|
<command>pg_rewind</command> to return without waiting, which is
|
||||||
faster, but means that a subsequent operating system crash can leave
|
faster, but means that a subsequent operating system crash can leave
|
||||||
the synchronized data folder corrupt. Generally, this option is
|
the synchronized data directory corrupt. Generally, this option is
|
||||||
useful for testing but should not be used when creating a production
|
useful for testing but should not be used when creating a production
|
||||||
installation.
|
installation.
|
||||||
</para>
|
</para>
|
||||||
|
@ -474,10 +474,10 @@ pgbench <optional> <replaceable>options</replaceable> </optional> <replaceable>d
|
|||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
Because in "prepared" mode <application>pgbench</application> reuses
|
In the <literal>prepared</literal> mode, <application>pgbench</application>
|
||||||
the parse analysis result for the second and subsequent query
|
reuses the parse analysis result starting from the second query
|
||||||
iteration, <application>pgbench</application> runs faster in the
|
iteration, so <application>pgbench</application> runs faster
|
||||||
prepared mode than in other modes.
|
than in other modes.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The default is simple query protocol. (See <xref linkend="protocol"/>
|
The default is simple query protocol. (See <xref linkend="protocol"/>
|
||||||
|
@ -156,7 +156,7 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURR
|
|||||||
<para>
|
<para>
|
||||||
When this option is used, <productname>PostgreSQL</productname> will rebuild the
|
When this option is used, <productname>PostgreSQL</productname> will rebuild the
|
||||||
index without taking any locks that prevent concurrent inserts,
|
index without taking any locks that prevent concurrent inserts,
|
||||||
updates, or deletes on the table; whereas a standard reindex build
|
updates, or deletes on the table; whereas a standard index rebuild
|
||||||
locks out writes (but not reads) on the table until it's done.
|
locks out writes (but not reads) on the table until it's done.
|
||||||
There are several caveats to be aware of when using this option
|
There are several caveats to be aware of when using this option
|
||||||
— see <xref linkend="sql-reindex-concurrently"
|
— see <xref linkend="sql-reindex-concurrently"
|
||||||
@ -280,12 +280,12 @@ REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } [ CONCURR
|
|||||||
of writes. This method is invoked by specifying the
|
of writes. This method is invoked by specifying the
|
||||||
<literal>CONCURRENTLY</literal> option of <command>REINDEX</command>. When this option
|
<literal>CONCURRENTLY</literal> option of <command>REINDEX</command>. When this option
|
||||||
is used, <productname>PostgreSQL</productname> must perform two scans of the table
|
is used, <productname>PostgreSQL</productname> must perform two scans of the table
|
||||||
for each index that needs to be rebuild and in addition it must wait for
|
for each index that needs to be rebuilt and wait for termination of
|
||||||
all existing transactions that could potentially use the index to
|
all existing transactions that could potentially use the index.
|
||||||
terminate. This method requires more total work than a standard index
|
This method requires more total work than a standard index
|
||||||
rebuild and takes significantly longer to complete as it needs to wait
|
rebuild and takes significantly longer to complete as it needs to wait
|
||||||
for unfinished transactions that might modify the index. However, since
|
for unfinished transactions that might modify the index. However, since
|
||||||
it allows normal operations to continue while the index is rebuilt, this
|
it allows normal operations to continue while the index is being rebuilt, this
|
||||||
method is useful for rebuilding indexes in a production environment. Of
|
method is useful for rebuilding indexes in a production environment. Of
|
||||||
course, the extra CPU, memory and I/O load imposed by the index rebuild
|
course, the extra CPU, memory and I/O load imposed by the index rebuild
|
||||||
may slow down other operations.
|
may slow down other operations.
|
||||||
@ -442,8 +442,8 @@ broken_db=> \q
|
|||||||
</programlisting></para>
|
</programlisting></para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Rebuild a table while authorizing read and write operations on involved
|
Rebuild indexes for a table, without blocking read and write operations
|
||||||
relations when performed:
|
on involved relations while reindexing is in progress:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
REINDEX TABLE CONCURRENTLY my_broken_table;
|
REINDEX TABLE CONCURRENTLY my_broken_table;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user