doc: Add an example of REPACK (CONCURRENTLY)

Suggested-by: vignesh C <vignesh21@gmail.com>
Discussion: https://postgr.es/m/CALDaNm3tiKhtegx5Cawi34UjbHmNGEDNAtScGM1RgWRtV-5_0Q@mail.gmail.com
This commit is contained in:
Álvaro Herrera 2026-04-07 15:33:55 +02:00
parent 9480c585df
commit 8fb95a8ab6
No known key found for this signature in database
GPG key ID: 1C20ACB9D5C564AE

View file

@ -390,13 +390,21 @@ REPACK employees;
<para>
Repack the table <literal>employees</literal> on the basis of its
index <literal>employees_ind</literal> (Since index is used here, this is
index <literal>employees_ind</literal> (since an index is specified, this is
effectively clustering):
<programlisting>
REPACK employees USING INDEX employees_ind;
</programlisting>
</para>
<para>
Repack the <literal>employees</literal> table following the same index
as was used before, in concurrent mode:
<programlisting>
REPACK (CONCURRENTLY) employees USING INDEX;
</programlisting>
</para>
<para>
Repack the table <literal>cases</literal> on physical ordering,
running an <command>ANALYZE</command> on the given columns once