Re: Assertion on create index concurrently
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2021-06-27T01:35:49Z
Lists: pgsql-bugs
On Sat, Jun 26, 2021 at 09:48:45PM +0300, Andrey Lepikhov wrote: > I found one annoying assertion in the CREATE INDEX CONCURRENTLY operation. > It will happen if you add into WHERE part of CREATE INDEX CONCURRENTLY some > function that will make transactional update (see an example in the attached > patch). > > It looks like a hack, but it lead to assertion and restart of the instance, > that isn't good. > I suggest to perform error, not assertion in this case (see the patch). > > This problem affects PG 9.6 - 13. The master branch was fixed 9 months ago > by commit 83158f7, that made this operation transactional, but still. This looks like a good argument for back-patching 83158f7 all the way down, as 813fb03 exists since 9.4. Any thoughts from others? -- Michael
Commits
-
Add test for CREATE INDEX CONCURRENTLY with not-so-immutable predicate
- 21257a8f6dcb 9.6.23 landed
- 5160d5bb1662 10.18 landed
- 38ca11adeb5a 11.13 landed
- ce8949c4b6e2 12.8 landed
- fd7bc10ab4c6 13.4 landed
- 09a69f6e2336 14.0 landed
-
Make index_set_state_flags() transactional
- d3d0cbeb6232 9.6.23 landed
- 3c465883b8a6 10.18 landed
- 08acba558bba 11.13 landed
- e52f7cbec16c 12.8 landed
- acb60edf0254 13.4 landed
- 83158f74d3ab 14.0 cited