Skip to content

feat: add admin FORCE_RELOAD command - #1502

Draft
jkaczman wants to merge 2 commits into
mainfrom
jk-force-reload
Draft

feat: add admin FORCE_RELOAD command#1502
jkaczman wants to merge 2 commits into
mainfrom
jk-force-reload

Conversation

@jkaczman

@jkaczman jkaczman commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Adds an admin FORCE_RELOAD command, which acts as a normal RELOAD plus guarantees all in-flight transactions are terminated prior to the command's conclusion (and subsequent transactions are sent to the new Pools).

Internally, it uses pg_terminate_backend to terminate all PIDs corresponding to active connections on each Pool.

Includes some preventive measures to prevent cases like transactions slipping through to the old Pool between termination and the reload; this is prevented by a temporary (not-propagated) pause flag set on the Pool before terminations occur.

Couple TODOs marked in the code I will look into before I mark this ready to merge.

Fixes #1472.

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Admin] Add FORCE_RELOAD command

1 participant