Commit 313cbdc7 authored by Peter Geoghegan's avatar Peter Geoghegan

Doc: Correct description of amcheck example query.

The amcheck documentation incorrectly claimed that its example query
verifies every catalog index in the database.  In fact, the query only
verifies the 10 largest indexes (as determined by pg_class.relpages).
Adjust the description accordingly.

Backpatch: 10-, where contrib/amcheck was introduced.
parent 1eee8d49
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
functions. functions.
</para> </para>
<para> <para>
<filename>amcheck</filename> functions may be used only by superusers. <filename>amcheck</filename> functions may only be used by superusers.
</para> </para>
<sect2> <sect2>
...@@ -83,14 +83,13 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -83,14 +83,13 @@ ORDER BY c.relpages DESC LIMIT 10;
| pg_amop_fam_strat_index | 5 | pg_amop_fam_strat_index | 5
(10 rows) (10 rows)
</screen> </screen>
This example shows a session that performs verification of every This example shows a session that performs verification of the
catalog index in the database <quote>test</quote>. Details of just 10 largest catalog indexes in the database <quote>test</quote>.
the 10 largest indexes verified are displayed. Verification of Verification of the presence of heap tuples as index tuples is
the presence of heap tuples as index tuples is requested for requested for the subset that are unique indexes. Since no
unique indexes only. Since no error is raised, all indexes error is raised, all indexes tested appear to be logically
tested appear to be logically consistent. Naturally, this query consistent. Naturally, this query could easily be changed to
could easily be changed to call call <function>bt_index_check</function> for every index in the
<function>bt_index_check</function> for every index in the
database where verification is supported. database where verification is supported.
</para> </para>
<para> <para>
...@@ -292,8 +291,7 @@ ORDER BY c.relpages DESC LIMIT 10; ...@@ -292,8 +291,7 @@ ORDER BY c.relpages DESC LIMIT 10;
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Corruption caused by faulty RAM, and the broader memory subsystem Corruption caused by faulty RAM, or the broader memory subsystem.
and operating system.
</para> </para>
<para> <para>
<productname>PostgreSQL</productname> does not protect against correctable <productname>PostgreSQL</productname> does not protect against correctable
......
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