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

From Robert Haas
Subject Re: Bug in wait time when waiting on nested subtransaction
Date
Msg-id CA+TgmoZDGjHdkZimZ-M3kpK6s3SQGwOEXtZmHqEorvttOFnrdg@mail.gmail.com
Whole thread Raw
In response to Re: 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 Mon, Nov 28, 2022 at 2:45 PM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:
> An easy point to confuse:
> "subtransaction to end": The subtransaction is "still running" to
> other backends even AFTER it has been subcommitted, but its state now
> transfers to the parent.
>
> So the subtransaction doesn't cease running until it aborts, one of
> its parent aborts or top level commit. The subxid lock should, on
> principle, exist until one of those events occurs. It doesn't, but
> that is an optimization, for the stated reason.

That's not what "running" means to me. Running means it's started and
hasn't yet committed or rolled back.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Bug in wait time when waiting on nested subtransaction
Next
From: "David G. Johnston"
Date:
Subject: Re: fixing CREATEROLE