Can you perform LISTEN/UNLISTEN on a PostgreSQL read replica?

Viewed 143

I created a read replica of a PostgreSQL 10 instance in AWS RDS. I was assuming that my clients would be able to LISTEN for notifications on the replica, but that does not seem to be the case. I have tried to research the limitation, but I have not found anything concrete. Can clients LISTEN/UNLISTEN for NOTIFY events on a read replica?

1 Answers

No, that won't work:

LISTEN test;
ERROR:  cannot execute LISTEN during recovery

NOTIFY test;
ERROR:  cannot execute NOTIFY during recovery
Related