pgadmin-org / pgadmin-org/pgadmin4

Open queries autoruns when I start the app

Open
#10,031 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

Please note that security bugs or issues should be reported to security@pgadmin.org.

Describe the bug

When I have opened queries from the last session, they automatically gets executed on the next startup of the app.

To Reproduce

Steps to reproduce the behavior:

  1. Start the app and connect to a server.
  2. Open a query window and write a SELECT that gets data from an existing table.
  3. Close the app with the query window open.
  4. Restart the app.
  5. The previous query window is opened again and executed.

Expected behavior

The query should not be automatically executed. Imagine if I have a DELETE query saved and that runs.

Error message

If possible, include the full, unedited text of any error messages displayed.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows-11-10.0.26200-SP0
  • pgAdmin version: 9.15
  • Mode: Desktop
  • Package type: [e.g. RPM, DEB, Python, Container, etc.]

Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Desktop mode using the listed five steps, then trace the startup flow that restores the previous query window. Check how the restored query is handled after reopening. Done means a previously open query is restored without executing automatically, including a potentially destructive query such as DELETE.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
database, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.