Re: Listen / Notify rewrite

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Listen / Notify rewrite
Date: 2009-11-12 00:04:28
Message-ID: 4AFB510C.806@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

/*
+ * This function is executed for every notification found in the queue in order
+ * to check if the current backend is listening on that channel. Not sure if we
+ * should further optimize this, for example convert to a sorted array and
+ * allow binary search on it...
+ */
+ static bool
+ IsListeningOn(const char *channel)

I think a bsearch would be needed. Very busy servers that make heavy use of
notifies would be quite a penalty.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2009-11-12 00:10:22 Re: Deadlock on the same object?
Previous Message Josh Berkus 2009-11-12 00:02:07 Re: Patch committers