- Notifications
You must be signed in to change notification settings - Fork4k
Switch from pg_local to pg#14825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
7998fc2 to669513bComparemichaelklishin commentedOct 27, 2025
To add a bit of context here. Process groups can be used in many ways but specifically in RabbitMQ they were used for tracking of exclusive queues on an AMQP 0-9-1 connection, so that when a connection terminates, all exclusive queues (if any) on it would be terminated very shortly after. RabbitMQ Stream Protocol does not allow clients to declare exclusive streams, so it likely can avoid using process groups entirely. And so can most protocol readers. |
4292012 tob88adbbCompareAnd no longer a function available in the stream plugin.Referencesrabbitmq/rabbitmq-server#14825
This function was not called from anywhereand was the only place that expected streamconnections to be registered in pg_local.
pg_local is based on the pg2 module, which got removedfrom Erlang/OTP years ago. It was replaced by the moreefficient pg module, so let's use it directly.We use node-local scopes and single-item groups so that(de)registration is fast, but we can list all connections/channels(by listing all groups in the scope).
These values don't chnage at runtime andtake a surprising amount of resources whenopening a lot of connections. This speedsup opening many connections/channels by 10%in my tests.
The metadata can take a few milliseconds to reflect a node is down, sothe test code must consider a connection failure and test another node.
a04acbe tod80fe0eCompare
Uh oh!
There was an error while loading.Please reload this page.
pg_local is based on the pg2 module, which got removed
from Erlang/OTP years ago. It was replaced by the more
efficient pg module, so let's use it directly.
We use node-local scopes and single-item groups so that
(de)registration is fast, but we can list all connections/channels
(by listing all groups in the scope).