Thanks. I was kind of suspecting that. But it's nice to have it confirmed.

I might try a random delay on the client side after receiving the notification, before I query. That may help to break up the load on the server.

On Feb 16, 2004, at 10:27 AM, Mikhail Terekhov wrote:
I'd say it is related to the design of the application. Imagine what happens:

1. You have 140 backends, most/all of them are sleeping.
2. One client sends a NOTIFY.
3. All 140 backends get awake all together and send a notify message to their clients.
4. All 140 clients almost at the same time send a query to the same table.
5. Unless you have a _very_ powerful server it will be _very_ slow.


It is a classical multitask bottleneck problem.



---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster

Reply via email to