Re: Using NOTIFY... Slow Client Querys - Mailing list pgsql-general

From Joe Lester
Subject Re: Using NOTIFY... Slow Client Querys
Date
Msg-id 34555D1A-614C-11D8-AFDF-000A95A58EA0@sweetwater.com
Whole thread Raw
In response to Re: Using NOTIFY... Slow Client Querys  (Mikhail Terekhov <terekhov@emc.com>)
List pgsql-general
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.



pgsql-general by date:

Previous
From: Joe Lester
Date:
Subject: Re: Using NOTIFY... Slow Client Querys
Next
From: "Edmund Zynda"
Date:
Subject: unsubscribe