Re: autonomous transactions

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: autonomous transactions
Дата
Msg-id 87zkvihwp8.fsf@hi-media-techno.com
обсуждение исходный текст
Ответ на Re: autonomous transactions (was Re: TODO note)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: autonomous transactions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> One thing that strikes me (maybe this is obvious) is that the
> execution of the main transaction and the autonomous transaction are
> not interleaved: it's a stack.  So in terms of globals and stuff,
> assuming you knew which things needed to be updated, you could push
> all that stuff off to the side, do whatever with the new transaction,
> and then restore all the context afterwards.

I think they call that dynamic scope, in advanced programming
language. I guess that's calling for a quote of Greenspun's Tenth Rule:
 Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow
implementationof half of Common Lisp. 

So the name of the game could be to find out a way to implement (a
limited form of) dynamic scoping in PostgreSQL, in C, then find out all
and any backend local variable that needs that to support autonomous
transactions, then make it happen… Right?

Regards,
--
dim


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

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: TODO note
Следующее
От: Itagaki Takahiro
Дата:
Сообщение: Make CLUSTER VERBOSE more verbose