Workspace and query windows not saved on restart (RM #5193)
Issue migrated from Redmine: https://redmine.postgresql.org/issues/5193 Originally created by Bilge B at 2020-02-15 09:36:55 UTC.
If the application is restarted, either deliberately or otherwise, all the work in however many open query windows is permanently lost. It should be clear that preserving work and the application state is better than not, whether or not the user actually cares about the content of those windows, but especially when they do. I realize each query can be manually saved to disk, but even in that case, the same open query windows should be presented when the application reloads so the workspace state is always preserved instead of reset to a blank slate each time.
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5193#note-1 Originally created by Aditya Toshniwal at 2020-02-21 11:27:19 UTC.
Redmine ticket header update:
| Name | Old Value | New Value |
|---|---|---|
| Priority changed | High | Normal |
| Sprint changed | Ready |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5193#note-2 Originally created by Yogesh Mahajan at 2021-04-02 11:49:06 UTC.
Redmine ticket header update:
| Name | Old Value | New Value |
|---|---|---|
| Relationship (duplicated) changed | RM #6342 |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/5193#note-3 Originally created by Akshay Joshi at 2021-06-11 11:21:38 UTC.
Redmine ticket header update:
| Name | Old Value | New Value |
|---|---|---|
| Relationship (duplicated) changed | RM #6515 |
This would be an extremely helpful feature, is it still slated to be developed?
This feature has been requested every day for the past decade. They are never going to do it.
I see I filed a duplicate request for this. I hope you'll prioritize it.
They will never.
On Wed, 12 Feb 2025, 12:15 Anthony DeBarros, @.***> wrote:
I see I filed a duplicate request for this. I hope you'll prioritize it.
— Reply to this email directly, view it on GitHub https://github.com/pgadmin-org/pgadmin4/issues/3319#issuecomment-2653544463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADS4YWNAVJMPJJUFAKTQXD2PM3O7AVCNFSM6AAAAABW7OXBH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJTGU2DINBWGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This feature is already included in the sprint, but due to higher-priority tasks, we are unable to prioritize its implementation.
This would be really nice! A definite missing feature coming from mysql workbench.
As part of the feature we have added new preference 'Miscellaneous > User Interface > Save Application State', whether to preserve tools windows and data. If this setting is turned on, tools window and its data will be saved to pgadmin configuration db. On abrupt shutdown/ refresh of the pgadmin , these tools will be restored with the the respective data.
@Bilge , @anthonydb May you can give a try on snapshot build before it release .
@yogeshmahajan-1903
I installed the latest snapshot.
I noted that Save the application state? was set to true by default.
I opened the CREATE SCRIPT for a table as well as a query window in which I wrote a query and executed it.
I then force quit pgadmin.
Upon running pgadmin again, the two query windows were restored with the SQL they contained previously. Awesome!
The window where I had run the query and had the resulting data table did not preserve the data table but I'm not sure if if that's what's meant by:
tools window and its data will be saved
I noted that the Object Explorer was not restored to prior state. Would make a nice stretch goal.
Running on M4 Mac Sequoia 15.1.1
I am glad this feature finally saw the light of the day. Thank you!
@yogeshmahajan-1903 I installed the latest snapshot. I noted that
Save the application state?was set to true by default. I opened theCREATE SCRIPTfor a table as well as a query window in which I wrote a query and executed it. I then force quit pgadmin. Upon running pgadmin again, the two query windows were restored with the SQL they contained previously. Awesome!The window where I had run the query and had the resulting data table did not preserve the data table but I'm not sure if if that's what's meant by:
tools window and its data will be saved
I noted that the
Object Explorerwas not restored to prior state. Would make a nice stretch goal.Running on M4 Mac Sequoia 15.1.1
I am glad this feature finally saw the light of the day. Thank you!
You are correct, result grid data will NOT be restored.It will only restore only query editor content. In case of Schema diff - Only selected servers/db/schemas (not a comparison result), Psql - Only the psql windows with connection (no queries will be preserved.)
Looks good to me.
- ✅ Option enabled by default.
- ✅ Restores my query windows with the queries intact.
That's all I ever wanted! Is this data still going to be persisted when upgrading?
Opened three files and closed the program. All three were in the workspace when I re-opened it, so seems to work. Nice feature, thank you for implementing.
Found the 2 issues below during initial testing:
- If I have multiple tools tabs open and then continuously close them, and then close and reopen pgAdmin, only one tab is closed while the others remain open (If I have different tools tab opened and close them then also behaviour is not consistent).
- The schema diff tool state is not being saved.
⚠ One issue I have found is that, although my query windows are saved, their order is not. In fact, when I restarted my computer and re-opened the application, it seemed my tabs were loaded in reverse order... very confusing!
❗ OK this is definitely not working properly. I keep closing tabs, but every time I restart the application, more and more dead tabs that I closed days or even weeks ago keep reappearing, even tabs that I have now closed multiple times keep being resurrected by restarting the app.
❗ OK this is definitely not working properly. I keep closing tabs, but every time I restart the application, more and more dead tabs that I closed days or even weeks ago keep reappearing, even tabs that I have now closed multiple times keep being resurrected by restarting the app.
Above issue was reported while testing. Fix is available in 9.5 release or you can try the latest nightly build.
Tested and verified on latest candidate and snapshot build.
Created a separate issue for tab order not restoring correctly. #8901
I just "up"graded to 9.6 and lost all my queries! I try to downgrade to 9.5 to get them back, but the installer just blocks me with "A newer version of pgAdmin is already installed" 🤦🏻♂️