Re: Listen / Notify rewrite

From: Alex <alex323(at)gmail(dot)com>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andrew Chernow <andrew(at)esilo(dot)com>
Subject: Re: Listen / Notify rewrite
Date: 2009-11-15 16:20:22
Message-ID: 20091115112022.782f8b86@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 12 Nov 2009 11:22:32 -0500
Andrew Chernow <ac(at)esilo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-15 16:21:57 Re: patch - Report the schema along table name in a referential failure error message
Previous Message Robert Haas 2009-11-15 16:18:14 Re: Summary and Plan for Hot Standby