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

From Andrew Chernow
Subject Re: Listen / Notify rewrite
Date
Msg-id 4AFB510C.806@esilo.com
Whole thread Raw
In response to Re: Listen / Notify rewrite  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Listen / Notify rewrite
Re: Listen / Notify rewrite
List 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/


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Patch committers
Next
From: Itagaki Takahiro
Date:
Subject: Re: Deadlock on the same object?