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

From Tom Lane
Subject Re: Listen / Notify rewrite
Date
Msg-id 9378.1257987810@sss.pgh.pa.us
Whole thread Raw
In response to Re: Listen / Notify rewrite  (Andrew Chernow <ac@esilo.com>)
Responses Re: Listen / Notify rewrite
List pgsql-hackers
Andrew Chernow <ac@esilo.com> writes:
> +  * 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...

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

Premature optimization is the root of all evil ;-).  Unless you've done
some profiling and can show that this is a hot spot, making it more
complicated isn't the thing to be doing now.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Chernow
Date:
Subject: Re: Listen / Notify rewrite
Next
From: Itagaki Takahiro
Date:
Subject: Re: Partitioning option for COPY