{CREATE INDEX, REINDEX} CONCURRENTLY improvements
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Michael Paquier <michael@paquier.xyz>, James Coleman <jtc331@gmail.com>
Date: 2020-11-30T19:54:39Z
Lists: pgsql-hackers
Attachments
- 0001-create-ReindexIndexInfo.patch (text/x-diff)
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
Commits
-
VACUUM: ignore indexing operations with CONCURRENTLY
- d9d076222f5b 14.0 landed
-
Avoid spurious wait in concurrent reindex
- f9900df5f949 14.0 landed
-
Invent struct ReindexIndexInfo
- c6c4b37395b2 14.0 landed