diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-02-23 12:15:09 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2021-02-23 12:15:09 -0300 |
commit | d9d076222f5b94a85e0e318339cfc44b8f26022d (patch) | |
tree | 246a3d9659c6d782033f30d454055eb3fd7d81f1 /doc/src | |
parent | 6f6f284c7ee44264eb3e128e2bf54d9276711d11 (diff) | |
download | postgresql-d9d076222f5b94a85e0e318339cfc44b8f26022d.tar.gz postgresql-d9d076222f5b94a85e0e318339cfc44b8f26022d.zip |
VACUUM: ignore indexing operations with CONCURRENTLY
As envisioned in commit c98763bf51bf, it is possible for VACUUM to
ignore certain transactions that are executing CREATE INDEX CONCURRENTLY
and REINDEX CONCURRENTLY for the purposes of computing Xmin; that's
because we know those transactions are not going to examine any other
tables, and are not going to execute anything else in the same
transaction. (Only operations on "safe" indexes can be ignored: those
on indexes that are neither partial nor expressional).
This is extremely useful in cases where CIC/RC can run for a very long
time, because that used to be a significant headache for concurrent
vacuuming of other tables.
Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/20210115133858.GA18931@alvherre.pgsql
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_index.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/ref/reindex.sgml | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml index a5271a9f8f2..965dcf472ca 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -855,6 +855,8 @@ Indexes: Like any long-running transaction, <command>CREATE INDEX</command> on a table can affect which tuples can be removed by concurrent <command>VACUUM</command> on any other table. + Excepted from this are operations with the <literal>CONCURRENTLY</literal> + option for indexes that are not partial and do not index any expressions. </para> <para> diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml index 07795b57372..b22d39eba92 100644 --- a/doc/src/sgml/ref/reindex.sgml +++ b/doc/src/sgml/ref/reindex.sgml @@ -478,6 +478,8 @@ Indexes: Like any long-running transaction, <command>REINDEX</command> on a table can affect which tuples can be removed by concurrent <command>VACUUM</command> on any other table. + Excepted from this are operations with the <literal>CONCURRENTLY</literal> + option for indexes that are not partial and do not index any expressions. </para> <para> |