Thread: Regarding feature #3319
Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
Kindly share your inputs/suggestions.
Thanks
Anil
--
Anil Sahoo Software Engineer Power to Postgres | |
Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
Yes, We will store the details that are needed to re-establish the connection.
Anil
HiOn Mon, 12 Aug 2024 at 06:50, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
The main reason that this has never been worked on is that there is no way to restore the state of a connection to what it was and be sure we've got it right. How do you propose to handle that? I assume in a similar way to the warnings we give if a connection has to be re-established?
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
OK.--Dave PagepgAdmin: https://www.pgadmin.org
Hi,
Yes, We will store the details that are needed to re-establish the connection.
On Mon, Aug 12, 2024 at 2:08 PM Dave Page <dpage@pgadmin.org> wrote:HiOn Mon, 12 Aug 2024 at 06:50, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
The main reason that this has never been worked on is that there is no way to restore the state of a connection to what it was and be sure we've got it right. How do you propose to handle that? I assume in a similar way to the warnings we give if a connection has to be re-established?
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
OK.--Dave PagepgAdmin: https://www.pgadmin.org
Hi Anil,On Mon, Aug 12, 2024 at 3:02 PM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi,
Yes, We will store the details that are needed to re-establish the connection.How/Where are you planning to store the information? Query text could be large.On Mon, Aug 12, 2024 at 2:08 PM Dave Page <dpage@pgadmin.org> wrote:HiOn Mon, 12 Aug 2024 at 06:50, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
The main reason that this has never been worked on is that there is no way to restore the state of a connection to what it was and be sure we've got it right. How do you propose to handle that? I assume in a similar way to the warnings we give if a connection has to be re-established?
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
OK.--Dave PagepgAdmin: https://www.pgadmin.org--Thanks,Aditya Toshniwal"Don't Complain about Heat, Plant a TREE"
Hi Aditya,As we are already storing the query history in the pgAdmin 4's database file.I am planning to store the information the same way. That can be an internal database file like SQLite or external database.Let me know if you all have any suggestions on this.ThanksAnil--On Mon, Aug 19, 2024 at 11:40 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Anil,On Mon, Aug 12, 2024 at 3:02 PM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi,
Yes, We will store the details that are needed to re-establish the connection.How/Where are you planning to store the information? Query text could be large.On Mon, Aug 12, 2024 at 2:08 PM Dave Page <dpage@pgadmin.org> wrote:HiOn Mon, 12 Aug 2024 at 06:50, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
The main reason that this has never been worked on is that there is no way to restore the state of a connection to what it was and be sure we've got it right. How do you propose to handle that? I assume in a similar way to the warnings we give if a connection has to be re-established?
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
OK.--Dave PagepgAdmin: https://www.pgadmin.org--Thanks,Aditya Toshniwal"Don't Complain about Heat, Plant a TREE"
Hi Hackers,
We are going to store the below details
- List of Query tools opened
- List of connections present in each query tool
- Each connection’s details that are required to make the connection once the application restarts
- Active connection details of each query tool opened
- Store the query that is written in the editor that may or may not be executed
- Store the contents of the scratch pad
- Store the file which is opened in the query tool with any unsaved changes
Some questions that I have are mentioned below,
- For desktop mode the application is opened with some query tools and the user closes the application and on restarts the tabs will open as it is and will restore the workspace and connections on query tool tabs. But for server mode do we need to restore the query tool tabs and workspace? Because we see most of the desktop applications have this feature.
- I came across one issue reported by one user i.e https://github.com/pgadmin-org/pgadmin4/issues/6666, where pgAdmin crashed due to long SQL scripts that can be in Megabytes stored as query history. We fixed it by giving MAX_QUERY_LENGTH to 1000000, and checking if any query length is below the value then it gets stored in the database as query history else not. Should we go with storing the workspace and query tool details in SQLite DB or use a file system to store the details and retrieve the content accordingly?
Anil Sahoo Software Engineer Power to Postgres | |
Hi Anil,There can be multiple query tools open with large files. Not entirely sure if storing in SQLite DB is a good idea.External databases won't come in the picture as 99.99% users will not use external DB for desktop app. We're only doing this for desktop app.And also consider the case where a SQL file is opened with some unsaved changes.On Tue, Aug 20, 2024 at 9:11 AM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Aditya,As we are already storing the query history in the pgAdmin 4's database file.I am planning to store the information the same way. That can be an internal database file like SQLite or external database.Let me know if you all have any suggestions on this.ThanksAnil--On Mon, Aug 19, 2024 at 11:40 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:Hi Anil,On Mon, Aug 12, 2024 at 3:02 PM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi,
Yes, We will store the details that are needed to re-establish the connection.How/Where are you planning to store the information? Query text could be large.On Mon, Aug 12, 2024 at 2:08 PM Dave Page <dpage@pgadmin.org> wrote:HiOn Mon, 12 Aug 2024 at 06:50, Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:Hi Hackers,
This feature #3319, demands the Workspace and the Query tool panel to be saved before exiting the application and on restart it will show earlier opened panels.
We are already saving the Browser layout, Query tool layout and the Object explorer tree state but to save the contents of panels we will initially start with the Query tool. The below implementation will be done,
- Store the query tool panels and the list of connections present in each query tool panel and the active connection
- Store the query that is written in the editor
- Store the contents of scratch pad
The main reason that this has never been worked on is that there is no way to restore the state of a connection to what it was and be sure we've got it right. How do you propose to handle that? I assume in a similar way to the warnings we give if a connection has to be re-established?
We will use debouncing to store the workspace data and all other data related to panels in the pgAdmin 4's configured database file. Through debouncing we will be able to call the API at certain intervals of user interaction, and it will update the stored data related to workspace and all other panels.
OK.--Dave PagepgAdmin: https://www.pgadmin.org--Thanks,Aditya Toshniwal"Don't Complain about Heat, Plant a TREE"--Thanks,Aditya Toshniwal"Don't Complain about Heat, Plant a TREE"