Re: CREATE INDEX CONCURRENTLY on partitioned index
Ilya Gladyshev <ilya.v.gladyshev@gmail.com>
From: Ilya Gladyshev <ilya.v.gladyshev@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>, Alexander Pyhalov <a.pyhalov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org, Masahiko Sawada <sawada.mshk@gmail.com>, Michael Paquier <michael@paquier.xyz>, 李杰(慎追) <adger.lj@alibaba-inc.com>, 曾文旌(义从) <wenjing.zwj@alibaba-inc.com>, Alvaro Herrera <alvherre@2ndquadrant.com>
Date: 2022-12-03T15:13:30Z
Lists: pgsql-hackers
Attachments
- 0001-turn-off-reindex-reporting-for-create.patch (text/x-patch) patch 0001
Hi, Thank you Justin and Alexander for working on this, I have reviewed and tested the latest patch, it works well, the problems mentioned previously are all fixed. I like the idea of sharing code of reindex and index, but I have noticed some peculiarities as a user. The reporting is somewhat confusing as it switches to reporting for reindex concurrently while building child indexes, this should be fixed with the simple patch I have attached. Another thing that I have noticed is that REINDEX, which is used under the hood, creates new indexes with suffix _ccnew, and if the index building fails, the indexes that could not be build will have the name with _ccnew suffix. This can actually be seen in your test: ERROR: could not create unique index "idxpart2_a_idx2_ccnew" I find it quite confusing and I don't think that this the expected behavior (if it is, I think it should be documented, like it is for REINDEX). As an example of problems that it might entail, DROP INDEX will not drop all the invalid indexes in the inheritance tree, because it will leave _ccnew indexes in place, which is ok for reindex concurrently, but that's not how C-I-C works now. I think that fixing this problem requires some heavy code rewrite and I'm not quite sure how to go about it, if you have any ideas, I will be happy to try them out. Thanks, Ilya
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix assertion failure with REINDEX and event triggers
- c426f7c2b36a 17.0 cited