Re: Transaction callback

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Transaction callback
Дата
Msg-id 5365.1075571636@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Transaction callback  ("Thomas Hallgren" <thhal@mailblocks.com>)
Ответы Re: Transaction callback  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Transaction callback  (David Helgason <david@uti.is>)
Список pgsql-hackers
"Thomas Hallgren" <thhal@mailblocks.com> writes:
> Ideally, I'd like a "beforeCompletion" that is executed prior to the start
> of the commit process and a "afterCompletion" that is called when the
> transaction is commited. The latter would have a status flag indicating if
> status is "prepared" (to support 2-phase commits), "commited", or "rolled
> back".

And what exactly would this callback do?

The transaction commit sequence is sufficiently delicate that I'm not
interested in any proposals to call random user-written code in it.
The notion of a post-commit callback is even more problematic --- what
is it going to do at all?  It cannot modify the database, and it cannot 
do anything that risks getting an error, which seems to leave mighty
little scope for useful activity.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dump + restore didn't include schemas
Следующее
От: Tom Lane
Дата:
Сообщение: Kerberos as source of user name? (Re: [BUGS] segfault in psql on x86_64)