Re: chained transactions

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: chained transactions
Date: 2018-11-28 20:58:09
Message-ID: adb990de-c96d-c685-ddc1-5489aaf49316@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/11/2018 12:20, Fabien COELHO wrote:
> Shouldn't psql tab completion be updated as well?

Done. (I only did the AND CHAIN, not the AND NO CHAIN.)

> I must admit that do not like much the three global variables &
> Save/Restore functions. I'd suggest saving directly into 3 local variables
> in function CommitTransactionCommand, and restoring them when needed. Code
> should not be longer. I'd would not bother to skip saving when not
> chaining.

We're also using those functions in the 0002 patch. Should we just
repeat the code three times, or use macros?

> Copying & comparing nodes are updated. Should making, outing and reading
> nodes also be updated?

TransactionStmt isn't covered by the node serialization functions, so I
didn't see anything to update. What did you have in mind?

> About the tests: I'd suggest to use more options on the different tests,
> eg SERIALIZABLE, READ ONLY… Also ISTM that tests should show
> transaction_read_only value as well.

OK, updated a bit. (Using READ ONLY doesn't work because then you can't
write anything inside the transaction.)

Updated patch attached. The previous (v2) patch apparently didn't apply
anymore.

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

Attachment Content-Type Size
v3-0001-Transaction-chaining.patch text/plain 22.0 KB
v3-0002-Transaction-chaining-support-in-PL-pgSQL.patch text/plain 14.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-11-28 21:01:31 Re: pg_stat_ssl additions
Previous Message Alexander Korotkov 2018-11-28 20:26:35 Re: jsonpath