Re: Optimize LISTEN/NOTIFY
| От | Tom Lane | 
|---|---|
| Тема | Re: Optimize LISTEN/NOTIFY | 
| Дата | |
| Msg-id | 2749343.1759949176@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | Re: Optimize LISTEN/NOTIFY ("Joel Jacobson" <joel@compiler.org>) | 
| Ответы | 
                	
            		Re: Optimize LISTEN/NOTIFY
            		
            		 | 
		
| Список | pgsql-hackers | 
"Joel Jacobson" <joel@compiler.org> writes:
> On Tue, Oct 7, 2025, at 22:15, Tom Lane wrote:
>> 5. ChannelHashAddListener: "already registered" case is not reached,
>> which surprises me a bit, and neither is the "grow the array" stanza.
> I've added a test for the "grow the array" stanza.
> The "already registered" case seems impossible to reach, since the
> caller, Exec_ListenCommit, returns early if IsListeningOn.
Maybe we should remove the check for "already registered" then,
or reduce it to an Assert?  Seems pointless to check twice.
Or thinking a little bigger: why are we maintaining the set of
channels-listened-to both as a list and a hash?  Could we remove
the list form?
            regards, tom lane
		
	В списке pgsql-hackers по дате отправления: