mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
VACUUM: ignore indexing operations with CONCURRENTLY
As envisioned in commit c98763bf51
, 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
This commit is contained in:
@ -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>
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user