{CREATE INDEX, REINDEX} CONCURRENTLY improvements - Mailing list pgsql-hackers

From Alvaro Herrera
Subject {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Date
Msg-id 20201130195439.GA24598@alvherre.pgsql
Whole thread Raw
Responses Re: {CREATE INDEX, REINDEX} CONCURRENTLY improvements
List pgsql-hackers
Hello,

In a previous thread [1], we added smarts so that processes running
CREATE INDEX CONCURRENTLY would not wait for each other.

One is adding the same to REINDEX CONCURRENTLY.  I've attached patch
0002 here which does that.

Why 0002, you ask?  That's because preparatory patch 0001 simplifies the
ReindexRelationConcurrently somewhat by adding a struct to be used of
indexes that are going to be processed, instead of just a list of Oids.
This is a good change in itself because it let us get rid of duplicative
open/close of the index rels in order to obtain some info that's already
known at the start.

The other thing is that it'd be good if we can make VACUUM also ignore
Xmin of processes doing CREATE INDEX CONCURRENTLY and REINDEX
CONCURRENTLY, when possible.  I have two possible ideas to handle this,
about which I'll post later.


[1] https://postgr.es/m/20200810233815.GA18970@alvherre.pgsql

-- 
Álvaro Herrera       Valdivia, Chile

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Deleting older versions in unique indexes to avoid page splits
Next
From: Anastasia Lubennikova
Date:
Subject: Re: [DOC] Document concurrent index builds waiting on each other