Re: [PATCH] Hooks at XactCommand level

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Hooks at XactCommand level
Дата
Msg-id 701054.1625158062@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Hooks at XactCommand level  (Nicolas CHAHWEKILIAN <leptitstagiaire@gmail.com>)
Ответы Re: [PATCH] Hooks at XactCommand level
Re: [PATCH] Hooks at XactCommand level
Список pgsql-hackers
Nicolas CHAHWEKILIAN <leptitstagiaire@gmail.com> writes:
> As far as I am concerned, I am totally awaiting for this kind of feature
> exposed here, for one single reason at this time : the extension
> pg_statement_rollback will be much more valuable with the ability of
> processing "rollback to savepoint" without the need for explicit
> instruction from client side (and this patch is giving this option).

What exactly do these hooks do that isn't done as well or better
by the RegisterXactCallback and RegisterSubXactCallback mechanisms?
Perhaps we need to define some additional event types for those?
Or pass more data to the callback functions?

I quite dislike inventing a hook that's defined as "run during
start_xact_command", because there is basically nothing that's
not ad-hoc about that function: it's internal to postgres.c
and both its responsibilities and its call sites have changed
over time.  I think anyone hooking into that will be displeased
by the stability of their results.

BTW, per the cfbot the patch doesn't even apply right now.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Allow batched insert during cross-partition updates
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: rand48 replacement