Assertion on create index concurrently

From: Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Assertion on create index concurrently
Date: 2021-06-26 18:48:45
Message-ID: 9b905019-5297-7372-0ad2-e1a4bb66a719@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

--
regards,
Andrey Lepikhov
Postgres Professional

Attachment Content-Type Size
0001-Use-more-safe-procedure-to-check-a-non-transactional.patch text/plain 3.5 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Korotkov 2021-06-26 23:29:06 Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange
Previous Message Amit Kapila 2021-06-26 09:57:30 Re: BUG #17072: Assert for clogGroupNext failed due to a race condition in TransactionGroupUpdateXidStatus()