Mutable listen_addresses GUC
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t52367psql -h localhost -U postgresBuilt from patchset v1 (message #1), July 27, 2026 at 07:28 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t52367_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t52367_1 && git checkout t52367_1Patchset v1 (message #1) is on t52367_1
Hello.
It is necessary to restart PostgreSQL to bind to a different network
interface, thus breaking the active connections. This patch draft
makes it no longer necessary, just assign the new value to
`listen_addresses` GUC and send SIGHUP to Postmaster.
Do you think it is useful? Is there any chance to push it upstream?
Overall thoughts?
Ivan Kovmir <ivan.kovmir@cybertec.at> writes:
It is necessary to restart PostgreSQL to bind to a different network
interface, thus breaking the active connections.
On most platforms, if you set listen_addresses to "*" then there's no
problem, the kernel will automatically cope with IP address changes.
Do we really need more than that?
The reason I'm pushing back is that this patch looks extremely
complicated and hard-to-test. It also violates one of the fundamental
precepts of the GUC subsystem, namely that assign hooks shalt not
fail. And there is a lot of stuff you've not covered, such as the
logic around whether to register for Bonjour. We could possibly
make this feature work, but the cost-benefit ratio looks quite poor.
regards, tom lane