Re: About subxact and xact nesting level... - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: About subxact and xact nesting level...
Date
Msg-id CAEepm=1zOb6QFP6sytdAex=853D0whWSgs6HKsx3i14DNSjsdA@mail.gmail.com
Whole thread Raw
In response to About subxact and xact nesting level...  (<david@andl.org>)
Responses Re: About subxact and xact nesting level...  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: About subxact and xact nesting level...  ("dandl" <davidb@andl.org>)
Re: About subxact and xact nesting level...  (<david@andl.org>)
List pgsql-hackers
On Mon, May 2, 2016 at 12:24 PM,  <david@andl.org> wrote:
> Still trying to find my way around the source code…
>
>
>
> The file xact.c contains references to sub-transactions (subxact) and
> transaction nesting level, but no obvious documentation about what these
> correspond to in SQL. A search shows that plpython supports something called
> “proper sub transactions”. There are random mentions of subtransactions in
> the release notes, but nothing substantive that I can find, and nothing
> about transaction nesting.
>
>
>
> Any pointers to docs or help to understand much appreciated.

Subtransactions are used to implement SAVEPOINT, and also BEGIN blocks
with EXCEPTION clauses in plpgsql.

http://www.postgresql.org/docs/9.5/static/sql-savepoint.html
http://www.postgresql.org/docs/9.5/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING

--
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From:
Date:
Subject: About subxact and xact nesting level...
Next
From: Tom Lane
Date:
Subject: Re: About subxact and xact nesting level...