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

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Date: 2021-08-29 18:09:13
Message-ID: 20210829180913.ghojzzsgkqgm7vki@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2021-08-29 12:27:31 +0500, Andrey Borodin wrote:
> > 15 авг. 2021 г., в 18:45, Andres Freund <andres(at)anarazel(dot)de> написал(а):
> > On 2021-08-15 16:09:37 +0500, Andrey Borodin wrote:
> >> @@ -4573,7 +4649,7 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait)
> >> */
> >> proc = BackendIdGetProc(vxid.backendId);
> >> if (proc == NULL)
> >> - return true;
> >> + return WaitXact(vxid, InvalidTransactionId, wait);
> >>
> >> /*
> >> * We must acquire this lock before checking the backendId and lxid
> >> @@ -4587,9 +4663,12 @@ VirtualXactLock(VirtualTransactionId vxid, bool wait)
> >> || proc->fpLocalTransactionId != vxid.localTransactionId)
> >> {
> >> LWLockRelease(&proc->fpInfoLock);
> >> - return true;
> >> + return WaitXact(vxid, InvalidTransactionId, wait);
> >> }
> >
> > It seems like it's going to add a substantial amount of work even when
> > no 2PC xacts are involved?
> Only if 2PCs are enabled.

I don't think that's good enough. Plenty of systems have 2PC enabled but very
few if any transactions end up as 2PC ones.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-08-29 18:09:17 BUG #17166: PREPARE without types inconsistent type resolving
Previous Message Andrey Borodin 2021-08-29 07:27:31 Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data