Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events
Дата
Msg-id 13844.1532468610@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #15293: Stored Procedure Triggered by Logical Replication isUnable to use Notification Events  (Andres Freund <andres@anarazel.de>)
Ответы Re: BUG #15293: Stored Procedure Triggered by Logical Replication isUnable to use Notification Events  (Andres Freund <andres@anarazel.de>)
Re: BUG #15293: Stored Procedure Triggered by Logical Replication isUnable to use Notification Events  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> But I wonder if we shouldn't actually move the signalling part of
> ProcessCompletedNotifies() into CommitTransactionCommand() in v11. Given
> that transactions can now commit without a ready command being sent, due
> to the addition of procedures, that kind of seems necessary?

Hrm.  I have a nasty feeling that that code is dependent on being executed
at the outermost logic level.  In particular, ProcessCompletedNotifies
calls CommitTransactionCommand itself, so your proposal will create
infinite recursion.  There may be some other issues too.

Another question that needs consideration is whether an internal commit
should lead to immediate distribution of notifies to our own client.
I think it probably mustn't; from the standpoint of the client, its
originally-asked-for xact is still in progress, and it's not going to
expect any notifies until that ends.  So the proposed change is just
wrong if you ask me.

I agree we need some serious rethinking here.  Maybe the fix will end
up being just a few lines, but it might take significant restructuring
too.

            regards, tom lane


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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: 11beta crash/assert caused by parameter type changes
Следующее
От: matshyeq
Дата:
Сообщение: Re: Enhancement request: enable FIRST/LAST_value() also as a regularaggregate (not only as windowing function)