Re: About subxact and xact nesting level...

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: david(at)andl(dot)org
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: About subxact and xact nesting level...
Date: 2016-05-02 01:15:52
Message-ID: CAEepm=1zOb6QFP6sytdAex=853D0whWSgs6HKsx3i14DNSjsdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 2, 2016 at 12:24 PM, <david(at)andl(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-05-02 02:00:26 Re: About subxact and xact nesting level...
Previous Message david 2016-05-02 00:24:01 About subxact and xact nesting level...