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

When close pgAdmin4 without closing query tools, connections are not closed #7464

Closed
heindrickdumdum0217 opened this issue May 9, 2024 · 10 comments
Assignees
Labels

Comments

@heindrickdumdum0217
Copy link

heindrickdumdum0217 commented May 9, 2024

Describe the bug

When close pgAdmin4 without closing query tools, connections for query tools are not closed.

To Reproduce

Steps to reproduce the behavior:

  1. Open pgAdmin4 in browser and open two query tools.

  2. Check active connections using the following query.

    SELECT usename, backend_start, query_start, state_change, wait_event_type, wait_event, state, query
    FROM pg_stat_activity WHERE usename = 'postgres'
    ORDER BY backend_start
    

    Screenshot_1
    Last 2 connections are for opened two query tools.

  3. Close pgAdmin4, open again, check active connections. You will see connections for closed query tools are still remaining.
    Sometimes there are over 3 months opened connections for query tools in closed pgAdmin4.

    Screenshot_2
    As you can see, 2 connetions are still alive.

Expected behavior

When close pgAdmin4, all connections for query tools in closed pgAdmin4 should be closed too.

@adityatoshniwal
Copy link
Contributor

HI @heindrickdumdum0217,
Which browser are you using?

@heindrickdumdum0217
Copy link
Author

It's Google Chrome on Windows.

@adityatoshniwal
Copy link
Contributor

And which version of pgAdmin are you using? This was fixed.

@heindrickdumdum0217
Copy link
Author

Aha, I'm glad to hear.
I'm using 6.19, let me update and test.

@heindrickdumdum0217
Copy link
Author

@adityatoshniwal
I just updated pgAdmin4 to 8.5 and tested, it doesn't work.

@adityatoshniwal
Copy link
Contributor

We did test this and it is working fine except FireFox due to some API limitations. I tested just now with Chrome on Mac.

@heindrickdumdum0217
Copy link
Author

heindrickdumdum0217 commented May 9, 2024

@adityatoshniwal
I found the similar issue in this repo, but that issue is about not clsoed connection when close query tool itself.
What I'm saying is differnet.
When close pgAdmin4 itself, connections are not closed for query tools in the closed pgAdmin4.

@heindrickdumdum0217
Copy link
Author

@adityatoshniwal

Are you saying about it?
#5894

The above issue is about connection close when close query tool itself.

@heindrickdumdum0217
Copy link
Author

heindrickdumdum0217 commented May 9, 2024

@adityatoshniwal
Which pgAdmin4 version did you test with?

For me, 8,5 on ARM 64

@adityatoshniwal
Copy link
Contributor

Hi @heindrickdumdum0217,
The case which you're talking of is #5567. When using in a browser, pgAdmin will not close the connections automatically as there may be another tab of pgAdmin open. Instead, we introduced heartbeat check which is responsible for closing the connections automatically if the UI is not responding.

@pravesh-sharma pravesh-sharma closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants