| From: | ChoonSoo Park <luispark(at)gmail(dot)com> |
|---|---|
| To: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
| Subject: | listen from slave database |
| Date: | 2014-10-14 14:05:34 |
| Message-ID: | CACgbiFvFNfSw49mHu_bBhbt_YbTferJm0jb7qvaHxe6=Snn_hw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hi,
I know I can't use "listen" from streaming slave database.
From the document (
http://www.postgresql.org/docs/9.3/static/hot-standby.html)
(...Transactions started during hot standby will never be assigned a
transaction ID and cannot write to the system write-ahead log. Therefore,
the following actions will produce error messages:....)
My application must subscribe to the master database always because
"listen" doesn't work on slave database and also run "READ" query in the
master database because there could be some delay between master & slave
database. If I run "READ" query in the slave database immediately after
receiving notification, it is not guaranteed that I can retrieve the last
stats.
This problem might be solved if slave database supports "LISTEN" query.
How are you guys using NOTIFY/LISTEN in master/slave databases?
Thank you,
Choon Park
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2014-10-14 14:35:54 | Re: Where should I post 3rd party product announcements? |
| Previous Message | Mauro Sérgio | 2014-10-14 14:02:43 | Mailing list pgbr-geral |