Re: chained transactions

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>, Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-11-28T20:58:09Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. Transaction chaining

  2. Turn transaction_isolation into GUC enum