notify duplicate elimination performance

From: Hardy Falk <hardy(dot)falk(at)blue-cable(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: notify duplicate elimination performance
Date: 2014-02-08 17:56:41
Message-ID: 52F66FD9.2080502@blue-cable.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-02-08 18:02:09 Re: notify duplicate elimination performance
Previous Message Andres Freund 2014-02-08 17:52:56 Re: Changeset Extraction v7.5