pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Date: Sat, 17 Jul 2021 16:12:40 -0400
Message-ID: <20210717201240.GA874334@gust.leadboat.com> (raw)
In-Reply-To: <01824242-AA92-4FE9-9BA7-AEBAFFEA3D0C@yandex-team.ru>
References: <273957.1608400661@sss.pgh.pa.us>
	<X+A1M1HajC+knVDz@paquier.xyz>
	<FD04942E-BC4E-42FE-82DF-75D28E3093AC@yandex-team.ru>
	<2C1B82E7-B50C-470C-AE10-794ED2A7A64E@yandex-team.ru>
	<20210117072454.GA1709971@rfd.leadboat.com>
	<EF4A43BD-C62C-429B-94EE-9303A1321F47@yandex-team.ru>
	<20210124022743.GA2270535@rfd.leadboat.com>
	<74C78048-70E8-4356-8F10-6370C37136C8@yandex-team.ru>
	<9C782C9D-D53E-4154-B910-46F062A9AE9B@yandex-team.ru>
	<01824242-AA92-4FE9-9BA7-AEBAFFEA3D0C@yandex-team.ru>

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?





view thread (107+ messages)  latest in thread

Message-ID: <20210717201240.GA874334@gust.leadboat.com>
Permalink:  ../20210717201240.GA874334@gust.leadboat.com/
Also on:    postgresql.org/message-id/20210717201240.GA874334@gust.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noah@leadboat.com, x4mmm@yandex-team.ru, michael@paquier.xyz, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
  In-Reply-To: <20210717201240.GA874334@gust.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox