1

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.

Jacek Chmielewski
  • 1,763
  • 4
  • 16
  • 18

1 Answers1

1

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.

Michael Powers
  • 1,970
  • 1
  • 7
  • 12