Re: Bug in wait time when waiting on nested subtransaction - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Bug in wait time when waiting on nested subtransaction
Date
Msg-id 20221128185310.nfjtr2tbgj3tk6xi@alvherre.pgsql
Whole thread Raw
In response to Bug in wait time when waiting on nested subtransaction  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Bug in wait time when waiting on nested subtransaction
List pgsql-hackers
On 2022-Nov-28, Simon Riggs wrote:

> A narrative description of the issue follows:
> session1 - requests multiple nested subtransactions like this:
> BEGIN; ...
> SAVEPOINT subxid1; ...
> SAVEPOINT subxid2; ...

> However, if subxid2 subcommits, then the lock wait moves from subxid2
> to the topxid.

Hmm, do we really do that?  Seems very strange .. it sounds to me like
the lock should have been transferred to subxid1 (which is subxid2's
parent), not to the top-level Xid.  Maybe what the user wanted was to
release subxid1 before establishing subxid2?  Or do they want to
continue to be able to rollback to subxid1 after establishing subxid2?
(but why?)

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: predefined role(s) for VACUUM and ANALYZE
Next
From: walther@technowledgy.de
Date:
Subject: Re: fixing CREATEROLE