在pgologic复制表上从触发器通知 [英] Notify from trigger on pglogical replicated table
问题描述
我正在尝试基于PostgreSQL,pgologic和PostgreSQL的监听通知机制设置从服务器推送功能。在我的复制表上,我设置了一个触发器,该触发器使用pg_notify将消息插入后推入队列。将触发器更改为启用始终触发。
设置了侦听客户端后(另一个postgresql控制台,也尝试了多个python驱动程序,行为总是一样的)。
,直到从另一个不是由复制触发的进程发送另一个通知时,我才收到通知。手动发送通知后,我将收到触发器中推送的所有通知以及我手动发送的通知。
任何帮助表示感谢。
这是使用PostgreSQL的错误。 NOTIFY来自逻辑复制触发的触发器,无法正确触发通知。
在这里来自这个问题。
I'm trying to setup a push-from-server functionality based on PostgreSQL, pglogical and PostgreSQL's listen-notify mechanism. On my replicated table I've setup a trigger that uses pg_notify to push messages to queue after insert. Altered the trigger to "enable always trigger". With this setup, the behavior is not what I expected.
After setting up a listen client (another postgresql console, also tried multiple python drivers, behavior is always the same), I don't get the notifications until I send another notification from another process that is not triggered by replication. Once I send the notification by hand, I get all the notifications pushed from the trigger alongside the one I've sent manually.
Any help appreciated.
This is a bug with PostgreSQL. NOTIFY's coming from triggers that are triggered by logical replication don't properly trigger notifications. It's getting worked on.
Followed here from this question.
这篇关于在pgologic复制表上从触发器通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!