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 1slP0F-007Puq-GK for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Sep 2024 08:35:08 +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 1slP0E-008xwE-J0 for pgadmin-hackers@arkaria.postgresql.org; Tue, 03 Sep 2024 08:35:06 +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 1slP0E-008xw5-9r for pgadmin-hackers@lists.postgresql.org; Tue, 03 Sep 2024 08:35:06 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1slP0C-000QeZ-5o for pgadmin-hackers@postgresql.org; Tue, 03 Sep 2024 08:35:05 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2f3f163e379so81612311fa.3 for ; Tue, 03 Sep 2024 01:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; t=1725352503; x=1725957303; 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=Cxoozg3SNdlnOPaU34MrzGJF02ZFozZIOzUsxX2HOy0=; b=Wo7Faat+NQyE6+vbzZNYo1MzX6ebB5nQG5lnvRthO9gQdI0/WFwyuv155Xl4uE+Hi8 KmVIfTZIX/qGfX7iwHCJvYtF7D1L4BlL6qUp1OyZxsYlchMSNcy2sagKMqwNk+QFOBRB FSDmq5fm1lc0Xcn7MmEcZ0/ZRohprbV12xpIiY76uak6Plt13/GumTQDI+W3VAQ3Wvpb nIUe/XoXEck5M5lDH+viINipxdDunTzRDAgNYxk9gTMF6Le1jGo2o3cLkokisH/JV8YX LBkgg24qdoTqNWXCg+pEqkUJWfAuG2kLqaGC8DvA+10eo0duH1fbYUURdRaKspMV6CsC 8wAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725352503; x=1725957303; 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=Cxoozg3SNdlnOPaU34MrzGJF02ZFozZIOzUsxX2HOy0=; b=MMRSNdR9WyEGd+iTrXvfQWdlTT6UyOR50MYxnWDtPoK08dBoXVzbJPV+rn71UtZiSZ YqUOaKWvvdDKhgRiTKx9GqxljfoDrOZm88AdyJ9Udga0xn+LYOW8xJsLhKH5bvUXs58A rY8KigpJD5qVAkvyrqLYuwo8en16UPbtpgC1j3HMizjPwb+Xy+iMVVaFNUbKdrW4iC+q l8F5qd9pdAb706Ka/n8swKIDDBzJWJ4PFyh/Cm/VhoixEr0lSgr53IbsQ3e42x9UsB9D PiKiKm0aumnzvK25pNx/OLrhjJr0N8WKrV99e5Q/h+P1HKv4yEEPeLYt4oB/k4Wf0msa DVog== X-Gm-Message-State: AOJu0YyrIWST53ifNLJUsmirckaQtYg6bIIyHv17b4Mw8AGuxkGw9LcQ hc6L5sJNVpRWioro3HBkQy7sgWF6rxrjlV3NYQDv6V2gQqa46GtxCjesaL6w/8F9CMhkA7iUEme LJ5csp/D6gMH178bVti8CcxGT21BTdYEMIMLPLI2IEz1iwkM= X-Google-Smtp-Source: AGHT+IG6b4+SLQP96AV2ibUPqLS0h+OTuHbmHlqMy1Zt08uHoZYQLRh9ibnoipMtsTNrWZjpe7kL4n3thvQ1At8OFRo= X-Received: by 2002:a2e:a987:0:b0:2ef:226e:e150 with SMTP id 38308e7fff4ca-2f6108930d5mr150379551fa.32.1725352502787; Tue, 03 Sep 2024 01:35:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Tue, 3 Sep 2024 09:34:51 +0100 Message-ID: Subject: Re: Require suggestions on issue #7811 To: Pravesh Sharma Cc: pgadmin-hackers@postgresql.org Content-Type: multipart/alternative; boundary="0000000000000a99f7062132efbd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000000a99f7062132efbd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 3 Sept 2024 at 09:29, Pravesh Sharma < pravesh.sharma@enterprisedb.com> wrote: > Hi Dave, > > On Tue, Sep 3, 2024 at 1:47=E2=80=AFPM Dave Page wrot= e: > >> Hi >> >> On Tue, 3 Sept 2024 at 09:10, Pravesh Sharma < >> pravesh.sharma@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> I am working on issue #7811 >>> , where using an >>> external database for storing pgAdmin configuration results in duplicat= e >>> server entries when a container with a mapped servers.json file is >>> restarted. >>> >>> The proposed solution is to implement a check when loading servers. We >>> would verify the server=E2=80=99s name, host, port, and username to det= ermine if >>> the server already exists in the database. If it does, we would skip >>> registering it again. >>> >>> >>> Please share any suggestions or feedback on this approach. >>> >> >> I would say "Won't fix". If someone is using persistent storage for >> settings, why launch containers to import the same servers over and over >> again? Just load them once, manually. >> > What if the container needs to be restarted? In that case it will again > import the server making a duplicate entry. > Not if the servers are manually imported rather than through servers.json. --=20 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/ --0000000000000a99f7062132efbd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, 3 Sept 2024 at 09:29, Pravesh= Sharma <pravesh.shar= ma@enterprisedb.com> wrote:
Hi Dave,

On Tue, Sep 3, 2024 at 1:47=E2=80=AFPM Dave Page <dpage@pgadmin.org> = wrote:
Hi

On Tue, 3 Sept 202= 4 at 09:10, Pravesh Sharma <pravesh.sharma@enterprisedb.com> wrote:
=
Hi Hackers,

I am working on issue #7811, where using an external data= base for storing pgAdmin configuration results in duplicate server entries = when a container with a mapped servers.json file is restarted.


The proposed solution is to implement a check when l= oading servers. We would verify the server=E2=80=99s name, host, port, and = username to determine if the server already exists in the database. If it d= oes, we would skip registering it again.


Please shar= e any suggestions or feedback on this approach.


I would say "Won't fix". If someon= e is using persistent storage for settings, why launch containers to import= the same servers over and over again? Just load them once, manually.=C2=A0=
What if the container=C2=A0needs to be = restarted? In that case it will again import the server making a duplicate = entry.

Not if the servers= are manually imported rather than through servers.json.
=C2=A0
--
--0000000000000a99f7062132efbd--