pgsql: VACUUM: ignore indexing operations with CONCURRENTLY

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pgsql: VACUUM: ignore indexing operations with CONCURRENTLY

Álvaro Herrera
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 <[hidden email]>
Reviewed-by: Masahiko Sawada <[hidden email]>
Discussion: https://postgr.es/m/20210115133858.GA18931@...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d9d076222f5b94a85e0e318339cfc44b8f26022d

Modified Files
--------------
doc/src/sgml/ref/create_index.sgml  |  2 ++
doc/src/sgml/ref/reindex.sgml       |  2 ++
src/backend/storage/ipc/procarray.c | 42 ++++++++++++++++++++++++++++++-------
src/backend/utils/misc/guc.c        |  2 +-
4 files changed, 39 insertions(+), 9 deletions(-)