Listen for all channel notifications

From: Trey Boudreau <trey(at)treysoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Listen for all channel notifications
Date: 2024-12-24 19:09:52
Message-ID: 6E2CC075-F1F4-47CB-9D9C-EC1B2D986DBA@treysoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Based on [1], please find attached an implementation for listening
for notifications on all channels. The first two chunks lay some
groundwork and do not change the current LISTEN behavior, except
to improve performance of managing large numbers of channels.

v1-0001-Make-simplehash-more-flexible.patch makes working with
char pointer keys possible.

v1-0002-Improve-LISTEN-NOTIFY-UNLISTEN-performance.patch replaces
the current List implementation with a simplehash.h-based table.

v1-0003-WIP-Allow-LISTENing-for-all-channels.patch has the real meat
but needs further work, as the results from pg_listening_channels()
provides no clue that, after 'LISTEN *', the results list exceptions
rather than notifiable channels.

[1]: https://www.postgresql.org/message-id/737106.1734732462%40sss.pgh.pa.us

-- Trey



Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message trey 2024-12-24 19:20:24 Re: Listen for all channel notifications
Previous Message Tom Lane 2024-12-24 17:57:20 Re: Regression tests fail on OpenBSD due to low semmns value