Re: [PATCH] Hooks at XactCommand level

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Hooks at XactCommand level
Дата
Msg-id 1125776.1627681749@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PATCH] Hooks at XactCommand level  (Gilles Darold <gilles@darold.net>)
Ответы Re: [PATCH] Hooks at XactCommand level  (Gilles Darold <gilles@darold.net>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2021-07-30 13:58:51 -0400, Tom Lane wrote:
>> I've not read this version of the patch, but I see from the cfbot's
>> results that it's broken postgres_fdw.

> I think this may partially be an issue with the way that postgres_fdw
> uses the callback than with the patch. It disconnects from the server
> *regardless* of the XactEvent passed to the callback. That makes it
> really hard to extend the callback mechanism to further events...

Perhaps.  Nonetheless, I thought upthread that adding these events
as Xact/SubXactCallback events was the wrong design, and I still
think that.  A new hook would be a more sensible way.

> I'm *very* unconvinced it makes sense to implement a feature like this
> in an extension / that we should expose API for that purpose. To me the
> top-level transaction state is way too tied to our internals for it to
> be reasonably dealt with in an extension.

Yeah, that's the other major problem --- the use-case doesn't seem
very convincing.  I'm not even sold on the goal, let alone on trying
to implement it by hooking into these particular places.  I think
that'll end up being buggy and fragile as well as not very performant.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] proposal for regexp_count, regexp_instr, regexp_substr and regexp_replace
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Replication protocol doc fix