Re: Regarding feature #3319 - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Regarding feature #3319
Date
Msg-id CA+OCxoyXBn+heMWc7Jg_b+sB=+KnTwcwGBYj2Tx8bzSNNqV8Uw@mail.gmail.com
Whole thread Raw
In response to Re: Regarding feature #3319  (Yogesh Mahajan <yogesh.mahajan@enterprisedb.com>)
Responses Re: Regarding feature #3319
Re: Regarding feature #3319
List pgadmin-hackers


On Wed, 19 Feb 2025 at 12:24, Yogesh Mahajan <yogesh.mahajan@enterprisedb.com> wrote:

Hi,

On Wed, Feb 19, 2025 at 5:12 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, 16 Jan 2025 at 06:37, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Anil/Dave,

Why not use browser localStorage for saving this information? It persists when the browser closes and is based on the URL. It is safer to store at the user's machine than on our server. 
For Electron also it should work.
This will reduce load on the pgAdmin server.

Because it stores it at the users machine and not on the pgAdmin server, and thus state cannot be restored if the user is on a different machine. I think that's a compelling feature.

That said, I think this is largely irrelevant until the fundamental problem is solved. e.g. how do we restore the state of the session (spoiler: it's almost certainly not possible, unless we can figure out all the session-changing side effects of every query, stored procedure/function etc. that may have been directly or indirectly called).

Or, we make a decision not to bother with that, and to give the user suitable warnings such as we do when we perform a reconnect.

If I understand correctly, Users are complaining about losing unsaved data in the query tool and not about data output or session state. Hence just reopening the query tool with only data should be suffice.

I'm sure that will suffice for 95%+ of users. The ones I'm concerned about are those who (for example) have done SET search_path = ... and then performed some destructive operation that worked as expected because of the earlier SET, but might cause data loss or unexpected consequences if run without the SET.

Granted, that class of issues is likely to affect only a small number of users in reality, but the consequences could easily be data loss.
 
--

pgadmin-hackers by date:

Previous
From: Yogesh Mahajan
Date:
Subject: Re: Regarding feature #3319
Next
From: Anthony DeBarros
Date:
Subject: Re: Regarding feature #3319