Skip to content

fix: forward LISTEN/NOTIFY/UNLISTEN to backend in session mode#800

Merged
levkk merged 4 commits intopgdogdev:mainfrom
mnbbrown:fix/listen-session-mode
Mar 2, 2026
Merged

fix: forward LISTEN/NOTIFY/UNLISTEN to backend in session mode#800
levkk merged 4 commits intopgdogdev:mainfrom
mnbbrown:fix/listen-session-mode

Conversation

@mnbbrown
Copy link
Contributor

@mnbbrown mnbbrown commented Mar 2, 2026

In session mode, forward LISTEN/NOTIFY/UNLISTEN directly to the backend as regular queries instead of going through the internal pub/sub system. Fixes "pub/sub disabled" errors when pub_sub_channel_size = 0 and replicas are configured.

In session mode, forward LISTEN/NOTIFY/UNLISTEN directly to the
backend as regular queries instead of going through the internal
pub/sub system. This fixes "pub/sub disabled" errors when
pub_sub_channel_size = 0 and replicas are configured.
@CLAassistant
Copy link

CLAassistant commented Mar 2, 2026

CLA assistant check
All committers have signed the CLA.

@mnbbrown
Copy link
Contributor Author

mnbbrown commented Mar 2, 2026

If this is the right direction I'll get some test coverage over it too.

@levkk
Copy link
Collaborator

levkk commented Mar 2, 2026

Yes, this is correct!

@mnbbrown
Copy link
Contributor Author

mnbbrown commented Mar 2, 2026

Yes, this is correct!

Nice. I'll figure out how to get some test coverage.

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/frontend/client/query_engine/mod.rs 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Integration test verifying LISTEN/NOTIFY works in session mode.
Regression test verifying LISTEN is not rejected with "pub/sub
disabled" when pub_sub_channel_size = 0 in session mode.
@mnbbrown
Copy link
Contributor Author

mnbbrown commented Mar 2, 2026

@levkk not sure if you think the regression integration test is worth the lines, but let me know :)

@levkk
Copy link
Collaborator

levkk commented Mar 2, 2026

I'll never say no to tests ;)

Full notification delivery in session mode needs further work.
This test verifies the original bug: LISTEN is no longer rejected
with "pub/sub disabled" in session mode.
@levkk levkk merged commit 6b1b9ae into pgdogdev:main Mar 2, 2026
8 checks passed
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.

3 participants