pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Treat <rob@xzilla.net>
Cc: Simon Riggs <simon.riggs@enterprisedb.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: New docs chapter on Transaction Management and related changes
Date: Sun, 13 Nov 2022 12:56:30 +0100
Message-ID: <bf0baafb080e933f2f07266c4ad1230b98b7ee5d.camel@cybertec.at> (raw)
In-Reply-To: <20221110111757.nsfkjm5d64skmpiu@alvherre.pgsql>
References: <20221110111757.nsfkjm5d64skmpiu@alvherre.pgsql>

On Thu, 2022-11-10 at 12:17 +0100, Alvaro Herrera wrote:
> On 2022-Nov-10, Laurenz Albe wrote:
> > On Wed, 2022-11-09 at 09:16 -0500, Robert Treat wrote:
> > > > > -      If <literal>AND CHAIN</literal> is specified, a new transaction is
> > > > > +      If <literal>AND CHAIN</literal> is specified, a new unaborted transaction is
> > > > >        immediately started with the same transaction characteristics (see <xref
> > > > >        linkend="sql-set-transaction"/>) as the just finished one.  Otherwise,
> > > > >        no new transaction is started.
> > 
> > A new transaction is never aborted in my understanding.  Being aborted
> > is not a characteristic of a transaction, but a state.
> 
> I agree, but maybe it's good to make the point explicit, because it
> doesn't seem obvious.  Perhaps something like
> 
> "If X is specified, a new transaction (never in aborted state) is
> immediately started with the same transaction characteristics (see X) as
> the just finished one.  Otherwise ..."
> 
> Getting the wording of that parenthical comment right is tricky, though.
> What I propose above is not great, but I don't know how to make it
> better.  Other ideas that seem slightly worse but may inspire someone:
> 
>   ... a new transaction (which is never in aborted state) is ...
>   ... a new transaction (not in aborted state) is ...
>   ... a new transaction (never aborted, even if the previous is) is ...
>   ... a new (not-aborted) transaction is ...
>   ... a new (never aborted) transaction is ...
>   ... a new (never aborted, even if the previous is) transaction is ...
>   ... a new (never aborted, regardless of the status of the previous one) transaction is ...
> 
> 
> Maybe there's a way to reword the entire phrase that leads to a better
> formulation of the idea.

Any of your auggestions is better than "unaborted".

How about:

  If <literal>AND CHAIN</literal> is specified, a new transaction is
  immediately started with the same transaction characteristics (see <xref
  linkend="sql-set-transaction"/>) as the just finished one.
  This new transaction won't be in the <quote>aborted</quote> state, even
  if the old transaction was aborted.

Yours,
Laurenz Albe





view thread (68+ messages)  latest in thread

Message-ID: <bf0baafb080e933f2f07266c4ad1230b98b7ee5d.camel@cybertec.at>
Permalink:  ../bf0baafb080e933f2f07266c4ad1230b98b7ee5d.camel@cybertec.at/
Also on:    postgresql.org/message-id/bf0baafb080e933f2f07266c4ad1230b98b7ee5d.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: laurenz.albe@cybertec.at, alvherre@alvh.no-ip.org, rob@xzilla.net, simon.riggs@enterprisedb.com, bruce@momjian.us, er@xs4all.nl, pryzby@telsasoft.com
  Subject: Re: New docs chapter on Transaction Management and related changes
  In-Reply-To: <bf0baafb080e933f2f07266c4ad1230b98b7ee5d.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox