Re: Prepared transaction releasing locks before deregistering its GID

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Oleksii Kliukin <alexk(at)hintbits(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepared transaction releasing locks before deregistering its GID
Date: 2019-02-19 11:54:31
Message-ID: 20190219115431.GX15532@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 19, 2019 at 10:59:33AM +0100, Oleksii Kliukin wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> If you run two transactions in parallel using your script, the second
>> transaction would wait at LOCK time until the first transaction
>> releases its locks with the COMMIT PREPARED.
>
> That is the desired outcome, right?

Yes, that is the correct one in my opinion, and we should not have GID
conflicts when running the scenario you provided upthread.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2019-02-19 11:57:32 Re: Speed up transaction completion faster after many relations are accessed in a transaction
Previous Message Tomas Vondra 2019-02-19 11:53:25 Re: Protect syscache from bloating with negative cache entries