Re: Listen / Notify rewrite - Mailing list pgsql-hackers

From Alex
Subject Re: Listen / Notify rewrite
Date
Msg-id 20091115112022.782f8b86@gmail.com
Whole thread Raw
In response to Re: Listen / Notify rewrite  (Andrew Chernow <ac@esilo.com>)
List pgsql-hackers
On Thu, 12 Nov 2009 11:22:32 -0500
Andrew Chernow <ac@esilo.com> wrote:

> 
> > However I share Greg's concerns that people are trying to use NOTIFY
> > as a message queue which it is not designed to be.
> 
> When you have an established libpq connection waiting for notifies it
> is not unreasonable to expect/desire a payload.  ISTM, the problem is
> that the initial design was half-baked.  NOTIFY is event-driven, ie.
> no polling!
> 

I agree. Wouldn't it make sense to allow the user to pass libpq a
callback function which is executed when NOTIFY events happen? Currently
we are forced to poll the connection, which means that we'll be checking
for a NOTIFY every time we have new data.

That just doesn't make sense.

-- 
Alex


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Summary and Plan for Hot Standby
Next
From: Tom Lane
Date:
Subject: Re: patch - Report the schema along table name in a referential failure error message