Re: [HACKERS] Transaction control in procedures - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [HACKERS] Transaction control in procedures
Date
Msg-id CANP8+jL56srHuvzA5vq=ob8vv-UT_HtKi87Uj3mi6qXdAE11zQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Transaction control in procedures  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
On 16 January 2018 at 20:24, Andrew Dunstan
<andrew.dunstan@2ndquadrant.com> wrote:

> Looks good. Marking ready for committer.

Few questions/points for the docs.

Docs say: "A new transaction is started automatically after a
transaction is ended using these commands"
Presumably this would have exactly the same isolation level and other
transaction characteristics?
(Is it somehow possible to vary that. OK if not, no problem)

The error "cannot commit while a subtransaction is active"
is commented as intending to prevent COMMIT/ROLLBACK inside an EXCEPTION block.
That makes sense. It seems it will also prevent SAVEPOINTs, though
that seems not to be intended.
The two cases are dissimilar and it would be possible to block the
former but allow the latter.

It's not documented or tested that SET LOCAL would work or not work.
Does it work?

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] Transaction control in procedures
Next
From: Jesper Pedersen
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table