I am hoping to implement a trigger that fires a notify on table change in PostgreSQL, but I am unable to find any definite answer to if it would work in a cluster.
Does PostgreSQL listen/notify work on AWS Aurora (both provisioned and serverless), and can I expect all clients to receive notifications regardless of what instance they are connected to?
If yes, are there any major performance concerns?
Thanks :)
The best AWS Documentation implies - YES, it does work
Specifically for Aurora Serverless, there is an advisory that "LISTEN/NOTIFY" is NOT RECOMMENDED. This implies that it's possible with Aurora Serverless but not advisable. It also implies that normal RDS LISTEN/NOTIFY does work and is ok to use.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html
Currently, certain SQL queries and commands, such as cursors with hold (DECLARE name ... CURSOR WITH HOLD FOR query); session-level advisory locks; temporary relations; and asynchronous notifications (LISTEN, NOTIFY commands) prevent scaling and are not recommended
My own quick test on AWS shows - Yes, it does work
...
Note: This test doesn't show a successful receipt of a notification. That will need a quick console application to test that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With