chained transactions

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема chained transactions
Дата
Msg-id 28536681-324b-10dc-ade8-ab46f7645a5a@2ndquadrant.com
обсуждение исходный текст
Ответы Re: chained transactions  (Andres Freund <andres@anarazel.de>)
Re: chained transactions  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Re: chained transactions  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
This feature is meant to help manage transaction isolation in
procedures.  I proposed elsewhere a patch that allows running SET
TRANSACTION in PL/pgSQL.  But if you have complex procedures that commit
many times in different branches perhaps, you'd have to do this in every
new transaction, which would create code that is difficult to manage.

The SQL standard offers the "chained transactions" feature to address
this.  The new command variants COMMIT AND CHAIN and ROLLBACK AND CHAIN
immediately start a new transaction with the characteristics (isolation
level, read/write, deferrable) of the previous one.  So code that has
particular requirements regard transaction isolation and such can use
this to simplify code management.

In the patch series, 0001 through 0006 is some preparatory code cleanup
that is useful independently.  0007 is the implementation of the feature
for the main SQL environment, 0008 is for PL/pgSQL.  Support in other
PLs could be added easily.

The patch series also requires the "SET TRANSACTION in PL/pgSQL" patch
for use in the test suite.

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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Gould
Дата:
Сообщение: Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuplesinaccurate.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: fixing more format truncation issues