Re: Bug in wait time when waiting on nested subtransaction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in wait time when waiting on nested subtransaction
Date: 2022-11-28 20:01:09
Message-ID: 749487.1669665669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> That's not what "running" means to me. Running means it's started and
> hasn't yet committed or rolled back.

A subxact definitely can't be considered committed until its topmost
parent commits. However, it could be known to be rolled back before
its parent. IIUC, the current situation is that we don't take
advantage of the latter case but just wait for the topmost parent.

One thing we need to be pretty careful of here is to not break the
promise of atomic commit. At topmost commit, all subxacts must
appear committed simultaneously. It's not quite clear to me whether
we need a similar guarantee in the rollback case. It seems like
we shouldn't, but maybe I'm missing something, in which case maybe
the current behavior is correct?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2022-11-28 20:02:34 Re: fixing CREATEROLE
Previous Message Tom Lane 2022-11-28 19:54:16 Re: Failed Assert in pgstat_assoc_relation