Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose connection_id access #408

Open
r33s3n6 opened this issue Feb 3, 2025 · 1 comment
Open

Expose connection_id access #408

r33s3n6 opened this issue Feb 3, 2025 · 1 comment

Comments

@r33s3n6
Copy link

r33s3n6 commented Feb 3, 2025

Description:
Users may need to terminate long-running queries by executing KILL <connection_id> in another connection, which requires access to the connection_id. While this ID can be obtained using SELECT CONNECTION_ID();, the server actually provides the connection_id during the handshake phase—we simply ignore it.

Would it be possible to store the connection_id in connection_state_data and expose a getter in any_connection for easier access?

Looking forward to your feedback on this proposal. Thanks!

@anarthal
Copy link
Collaborator

anarthal commented Feb 3, 2025

This definitely makes sense.

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

No branches or pull requests

2 participants