notify duplicate elimination performance - Mailing list pgsql-hackers

From Hardy Falk
Subject notify duplicate elimination performance
Date
Msg-id 52F66FD9.2080502@blue-cable.de
Whole thread Raw
Responses Re: notify duplicate elimination performance  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
I know that it is not a big problem for most users, but allowing a very
large number of notifications while using linear search is a bit dumb.
I can fix this with a very small modification to
struct Notification:
{char *channel ;char *payload ;uint32 hash ;struct Notification *left ;struct Notification *right ;
}
AsyncExistsPendingNotify does an iterative binary tree search.
The tree is insert-only, there is no need for rebalancing, and the code
is quite simple.
Any comments?



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Changeset Extraction v7.5
Next
From: Andres Freund
Date:
Subject: Re: notify duplicate elimination performance