Re: New docs chapter on Transaction Management and related changes - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: New docs chapter on Transaction Management and related changes
Date
Msg-id Y3fc6SqY3dG2Qd2x@momjian.us
Whole thread Raw
In response to Re: New docs chapter on Transaction Management and related changes  (Robert Treat <rob@xzilla.net>)
Responses Re: New docs chapter on Transaction Management and related changes
List pgsql-hackers
On Wed, Nov  9, 2022 at 09:16:18AM -0500, Robert Treat wrote:
> > "Subtransactions of the named savepoint" is somewhat confusing; how about
> > "subtransactions of the subtransaction established by the named savepoint"?
> >
> > If that is too long and explicit, perhaps "subtransactions of that subtransaction".
> >
> 
> Personally, I think these are more confusing.

That text is gone.

> > > --- a/doc/src/sgml/ref/rollback.sgml
> > > +++ b/doc/src/sgml/ref/rollback.sgml
> > > @@ -56,11 +56,14 @@ ROLLBACK [ WORK | TRANSACTION ] [ AND [ NO ] CHAIN ]
> > >      <term><literal>AND CHAIN</literal></term>
> > >      <listitem>
> > >       <para>
> > > -      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.
> >
> > I don't think that is an improvement.  "Unaborted" is an un-word.  A new transaction
> > is always "unaborted", isn't it?
> >
> 
> I thought about this as well when reviewing it, but I do think
> something is needed for the case where you have a transaction which
> has suffered an error and then you issue "rollback and chain"; if you
> just say "a new transaction is immediately started with the same
> transaction characteristics" it might imply to some the new
> transaction has some kind of carry over of the previous broken
> transaction... the use of the word unaborted makes it clear that the
> new transaction is 100% functional.

I changed it to:

      a new (unaborted) transaction is immediately started

> ISTR that you only use a comma before since in cases where the
> preceding thought contains a negative.
> 
> In any case, are you thinking something like this:
> 
> " 64 open subxids are cached in shared memory for each backend; after
>  that point the overhead increases significantly due to additional disk I/O
>  from looking up subxid entries in <filename>pg_subtrans</filename>."

I went with:

   Up to 64 open subxids are cached in shared memory for
   each backend; after that point, the storage I/O overhead increases
   significantly due to additional lookups of subxid entries in
   <filename>pg_subtrans</filename>.

New patch attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Indecision is a decision.  Inaction is an action.  Mark Batterson


Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Collation version tracking for macOS
Next
From: Bruce Momjian
Date:
Subject: Re: New docs chapter on Transaction Management and related changes