Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data

From: Noah Misch <noah(at)leadboat(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Date: 2021-07-17 20:12:40
Message-ID: 20210717201240.GA874334@gust.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Jul 17, 2021 at 10:01:00PM +0500, Andrey Borodin wrote:
> Sorry to say that, but $subj persists. Here's a simple reproduction.

> The problem is WaitForLockersMultiple() gathers running vxids and 2pc xids. Then it waits, but if vxid is converted to 2pc it fails to wait.

That makes sense.

> To fix it we can return locking xids along with vxids from GetLockConflicts() like in attached diff. But this approach seems ugly.

Suppose some transaction has a vxid but no xid. Shortly after
GetLockConflicts(), it acquires an xid, modifies the table, and issues PREPARE
TRANSACTION. Could that cause a corrupt index even with this diff?

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2021-07-17 20:51:38 Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows
Previous Message Tom Lane 2021-07-17 19:21:39 Re: BUG #17077: about three parameters in postgresql 13.3