Re: Race condition in TransactionIdIsInProgress

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Konstantin Knizhnik <knizhnik(at)garret(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Race condition in TransactionIdIsInProgress
Date: 2022-06-27 05:26:22
Message-ID: f5655ecb-f574-6cb5-f6da-e22edd9be9e0@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/06/2022 13:10, Simon Riggs wrote:
> On Sat, 25 Jun 2022 at 10:18, Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
>>
>> On 24/06/2022 04:43, Andres Freund wrote:
>>> On 2022-06-23 22:03:27 +0300, Heikki Linnakangas wrote:
>>>> In summary, I think we should:
>>>> - commit and backpatch Simon's
>>>> just_remove_TransactionIdIsKnownCompleted_call.v1.patch
>>>> - fix pg_xact_status() to check TransactionIdIsInProgress()
>>>> - in v15, remove TransationIdIsKnownCompleted function altogether
>>>>
>>>> I'll try to get around to that in the next few days, unless someone beats me
>>>> to it.
>>>
>>> Makes sense.
>>
>> This is what I came up with for master. One difference from Simon's
>> original patch is that I decided to not expose the
>> TransactionIdIsKnownNotInProgress(), as there are no other callers of it
>> in core, and it doesn't seem useful to extensions. I inlined it into the
>> caller instead.
>
> Looks good, thanks.

Committed and backpatched. Thanks!

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-06-27 06:02:11 Re: [BUG] Panic due to incorrect missingContrecPtr after promotion
Previous Message Shinoda, Noriyoshi (PN Japan FSIP) 2022-06-27 03:49:20 RE: PG15 beta1 fix pg_stats_ext/pg_stats_ext_exprs view manual