Re: Bug in wait time when waiting on nested subtransaction

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in wait time when waiting on nested subtransaction
Date: 2022-11-28 19:50:36
Message-ID: CA+TgmoZDGjHdkZimZ-M3kpK6s3SQGwOEXtZmHqEorvttOFnrdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 28, 2022 at 2:45 PM Simon Riggs
<simon(dot)riggs(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2022-11-28 19:52:36 Re: fixing CREATEROLE
Previous Message Simon Riggs 2022-11-28 19:44:54 Re: Bug in wait time when waiting on nested subtransaction