Re: chained transactions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: chained transactions
Date: 2019-03-18 10:15:34
Message-ID: 05b14a9b-c2bb-aadb-e5f7-c53c2913c1cc@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Updated patch. I have squashed the two previously separate patches
together in this one.

On 2019-01-06 15:14, Fabien COELHO wrote:
> I do not understand the value of the SAVEPOINT in the tests.

The purpose of the SAVEPOINT in the test is because it exercises
different switch cases in CommitTransactionCommand() and
AbortCurrentTransaction(). It's not entirely comprehensible from the
outside, but code coverage analysis confirms it.

> Otherwise I'm okay with this patch.
>
> About the second patch, I'm still unhappy with functions named commit &
> rollback doing something else, which result in somehow strange code, where
> you have to guess that the transaction is restarted in all cases, either
> within the commit function or explicitely.

I have updated the SPI interface with your suggestions. I agree it's
better that way.

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

Attachment Content-Type Size
v5-0001-Transaction-chaining.patch text/plain 35.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-03-18 10:22:40 Re: chained transactions
Previous Message Kyotaro HORIGUCHI 2019-03-18 10:15:12 Re: pg_basebackup ignores the existing data directory permissions