pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

Query tool restore connection fails

Open nikhil-mohite opened this issue 2 years ago • 2 comments

Please note that security bugs or issues should be reported to [email protected].

Describe the bug

The query tool is unable to restore the connection

To Reproduce

Steps to reproduce the behavior:

  1. Open the Query tool
  2. execute some queries
  3. Disconnect the server from the object explorer
  4. Try to execute a query on an already opened Query Tool
  5. It shows a connection dialog to create a new session image
  6. Click on Connect and check it shows an error in the Query tool Messages tab Screenshot 2023-06-26 at 4 27 03 PM
  7. Query tool unable to restore the connection (Note: If the user connects to the server from Object Explore then it is able to restore the connection)

Expected behavior

connection to the server should be restored in a new session

Desktop (please complete the following information):

  • OS: macOS (Ventura 13.3)
  • Version: [e.g. 6.15]
  • Mode: Both

nikhil-mohite avatar Jun 26 '23 11:06 nikhil-mohite

@nikhil-mohite, if the connection is restored from the browser tree, it should re-connect as per our old behaviour, but it will not if the it's disconnected from the browser tree.

khushboovashi avatar Jul 05 '23 12:07 khushboovashi

The original behaviour is fixed as per my comment. It will be not connected if it is disconnected from browser tree.

khushboovashi avatar Aug 03 '23 10:08 khushboovashi

The scenarios that are fixed for query tool are,

  1. Server password->Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  2. Server password->Not Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  3. Server password->Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  4. Server password->Not Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  5. SSH Tunnel->Tunnel password->Server password->Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  6. SSH Tunnel->Tunnel password->Server password->Not Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  7. SSH Tunnel->Tunnel password->Server password->Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  8. SSH Tunnel->Tunnel password->Server password->Not Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  9. SSH Tunnel->Identity file->Server password->Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  10. SSH Tunnel->Identity file->Server password->Not Saved->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  11. SSH Tunnel->Identity file->Server password->Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Macro, Update connection, New connection, Open query tool in a new tab
  12. SSH Tunnel->Identity file->Server password->Not Saved->Other DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  13. Server password->Password file->Other DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab
  14. Server password->Password file->Maintenance DB->Execute query,Execute script, Explain, Explain analyze, Update connection, New connection, Open query tool in a new tab

The scenarios that are fixed for view/edit data tool are, All the above scenarios with execute script button of View/Edit tool.

anilsahoo20 avatar Aug 28 '24 10:08 anilsahoo20

Issue fixed. Verified on latest snapshot build.

Env: OS - macOS Sonoma (14.6.1) Mode - Desktop

pravesh-sharma avatar Sep 16 '24 08:09 pravesh-sharma

Tested on snapshot build and the issue is fixed.

pravesh-sharma avatar Sep 19 '24 07:09 pravesh-sharma