Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgGjg-00Hazj-Bv for pgadmin-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 04:44:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sgGje-008YlP-GF for pgadmin-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 04:44:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgGje-008YkK-5B for pgadmin-hackers@lists.postgresql.org; Tue, 20 Aug 2024 04:44:46 +0000 Received: from mail-oa1-x2a.google.com ([2001:4860:4864:20::2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgGjZ-000YQo-Cx for pgadmin-hackers@postgresql.org; Tue, 20 Aug 2024 04:44:45 +0000 Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-270298a3b6eso2480514fac.3 for ; Mon, 19 Aug 2024 21:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1724129080; x=1724733880; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PTwSHW19nm12KeyOH26CWy260TPTdxai7IncrLMIFeM=; b=SIfwGAeYy5Zzqx4/v6oi02vPvPHQimxXImrXBk2efgZMQOnLup63I/VlrPiyALCoB3 ljbRjciAm6JsTeRMnDOPa+4bX+r4DX39xN06G1nTAsCmzGzeCn0vvCx01noJTO22O++S vpWuZz6pCt9A1ZdFJ7rd8Pm0FtPnHraF0P9b34Cm8QUnJg3WZxDDBwx/joXidoIcvzrB gZu0R2/9rADQdS45PZx1n//fh35734x95shZtPap7mMoTkc1LmxZRDIVa8u/KhegMft9 mEJF3INAAseoJmjUf5StDm/j9QUG+SN0yf01pUKr+TJvPLV2hS4GVaInMszV3mr1oHcw 5OhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724129080; x=1724733880; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PTwSHW19nm12KeyOH26CWy260TPTdxai7IncrLMIFeM=; b=Su0R2IFcLHmDz404kvpHQyT19pC59yCGJyXELA5jeeR8sncSZ7UvpVqi+GqBand89s oRUSpDQ9Jwi885oBlq+MiQFSj9tRkWUXw7JroOAcukIgQgZqV80J68slIX18r19mq60u QCr8UtH7GAAQHjMpEAbpTzyLQNdncaDiZdiLa7MVOxwmgwg3ZD8iSHs6Tyyq2eGy17c7 Uwm9e0d6vVgysKa4AL21cnl1wbbNhbYyCRwwADC4yQTWspznzFhLNmCNi01ThyS79bxw KsGMqrTwypO5L6CZM3rwiHW3Alsqwp7hlyzXdLOZ1JZe9/r41YAZ0vfTOmu4gCcTsSPh U5VA== X-Forwarded-Encrypted: i=1; AJvYcCUXEYBilGKFJWsGOrv/Wxa4cU74on54GJ+E3jnNmJkmXNgMCaf3DyUxU97MfNlsitYCyY/65tZGvKfWtUeHMAg=@postgresql.org X-Gm-Message-State: AOJu0YyIYDnp1HkT0vY/fsjMvZxWzinz3WlonEOCG5xt9MLmriL6zOrG jVyzZlgYw3Yb5I8F64fWB6GEAtFz7bdBqXu93hldcBllHaHKkAmKpmGd7AcRxqwAEfZhXM1tseo ulf9R6vkEIDN0rmKIjYB2Wxc22itG4X1un8Bcgr5CPQkAmw0= X-Google-Smtp-Source: AGHT+IHmM5AGzqXR3+PQbdPRtmdcQxaYpryY3aPlIPBAl6ki5Cvmi3rt/9kHc6Y/udKUWtbVQGzK6fECdp4MxB6igf8= X-Received: by 2002:a05:6871:e2a2:b0:260:ffaf:811b with SMTP id 586e51a60fabf-2701c38bfa2mr13601485fac.11.1724129080227; Mon, 19 Aug 2024 21:44:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Tue, 20 Aug 2024 10:14:04 +0530 Message-ID: Subject: Re: Regarding feature #3319 To: Anil Sahoo Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000005fdd3c062016150a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005fdd3c062016150a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFAM Anil Sahoo 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. > > Thanks > Anil > -- > > > > *Anil Sahoo* > > Software Engineer > > www.enterprisedb.com > > Power to Postgres > > > > > > > > On Mon, Aug 19, 2024 at 11:40=E2=80=AFAM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Anil, >> >> On Mon, Aug 12, 2024 at 3:02=E2=80=AFPM Anil Sahoo >> 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. >> >>> >>> Regards >>> Anil >>> -- >>> >>> >>> >>> *Anil Sahoo* >>> >>> Software Engineer >>> >>> www.enterprisedb.com >>> >>> Power to Postgres >>> >>> >>> >>> >>> >>> >>> >>> On Mon, Aug 12, 2024 at 2:08=E2=80=AFPM Dave Page w= rote: >>> >>>> Hi >>>> >>>> On Mon, 12 Aug 2024 at 06:50, Anil Sahoo >>>> 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, >>>>> >>>>> 1. Store the query tool panels and the list of connections present >>>>> in each query tool panel and the active connection >>>>> 2. Store the query that is written in the editor >>>>> 3. Store the contents of scratch pad >>>>> >>>>> The main reason that this has never been worked on is that there is n= o >>>> 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. Throug= h >>>>> debouncing we will be able to call the API at certain intervals of us= er >>>>> interaction, and it will update the stored data related to workspace = and >>>>> all other panels. >>>>> >>>> >>>> OK. >>>> >>>> -- >>>> Dave Page >>>> pgAdmin: https://www.pgadmin.org >>>> PostgreSQL: https://www.postgresql.org >>>> EDB: https://www.enterprisedb.com >>>> >>>> PGDay UK 2024, 11th September, London: https://2024.pgday.uk/ >>>> >>>> >> >> -- >> Thanks, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* >> >> "Don't Complain about Heat, Plant a TREE" >> > --=20 Thanks, Aditya Toshniwal pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* "Don't Complain about Heat, Plant a TREE" --0000000000005fdd3c062016150a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 extern= al 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=E2=80=AFAM 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 inf= ormation the same way. That can be an internal database file like SQLite or= external database.=C2=A0

Let me know if you a= ll have any suggestions on this.

Thanks
= Anil
--

=

= Anil Sahoo

Software Engineer

www.enterprisedb.com

Power to Postgres

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0



On Mon, Aug 19, 2024= at 11:40=E2=80=AFAM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com= > wrote:
Hi=C2=A0Anil,

On Mon, Aug 12, 2024 at 3:02=E2= =80=AFPM Anil Sahoo <anil.sahoo@enterprisedb.com> wrote:
Hi,

Yes, W= e will store the details that are needed to re-establish the connection.

How/Where are you planning=C2=A0to store the info= rmation? Query text could be large.

Regards
Anil
<= div>--

Anil Sahoo

<= span style=3D"font-size:13.3333px;white-space:pre-wrap">Software Engineer

www.enterprisedb.com

Power to Postgres

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0



On Mon, Aug 12, 2024 at 2:08=E2=80=AFPM Dav= e Page <dpage@pga= dmin.org> wrote:
Hi

On Mon, 12 Aug 2024 at 06:50, Anil Sahoo &l= t;anil.sah= oo@enterprisedb.com> wrote:

Hi Hackers,


This feature=C2=A0#3319, demands the Wor= kspace 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 init= ially start with the Query tool. The below implementation will be done,

  1. Store the query tool panels and the list of connections present in= each query tool panel and the active connection
  2. Store the query that is written in the editor
  3. 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&= #39;ve got it right. How do you propose to handle that? I assume in a simil= ar way to the warnings we give if a connection has to be re-established?=C2= =A0


We will use debouncing to store the workspace data and all other da= ta related to panels in the pgAdmin 4's configured database file. Throu= gh 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 al= l other panels.


OK.=C2=A0<= /div>

-- =
Dave PagepgAdmin: https://w= ww.pgadmin.org
PostgreSQL: https://www.postgresql.org

PGDay UK 2024, 11th September, Londo= n: https://2024.pgday.= uk/



--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Software Architect=C2=A0| enterprisedb.com

--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Software Architect=C2=A0| enterprisedb.com