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 1sdTTj-00FseJ-Kr for pgsql-admin@arkaria.postgresql.org; Mon, 12 Aug 2024 11:44:47 +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 1sdTTi-00FRDZ-2G for pgsql-admin@arkaria.postgresql.org; Mon, 12 Aug 2024 11:44:46 +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 1sdTTh-00FRDP-LO for pgsql-admin@lists.postgresql.org; Mon, 12 Aug 2024 11:44:45 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sdTTf-004RtG-0P for pgsql-admin@lists.postgresql.org; Mon, 12 Aug 2024 11:44:45 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7b2dbd81e3so530700766b.1 for ; Mon, 12 Aug 2024 04:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723463082; x=1724067882; darn=lists.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=3HQActM+BLptsMrImlj7DHkTqMIVv1YB+ATfleAOoD4=; b=XXnIf6ZOTXLnlET+H1HtyIfxTOI52sR/4MGNGj0wB0Qhlb1k3F2nJSNYmh6DZvLfBW 3fRp/nR6jbGX2l77vqqM6UUE4Yk6H7uK0eAspayGLR7ylH1X6nUwI0HdXLsxE5YatAT4 8fOfxCArjMyUp28+KDNCTy/nvKf+GHinLuCk6tnpUOsBGarwk7vzsLF+KVIWEJzC4an1 v9xz+wF8GqFN/9yAFJrzN5/7trs1ndJI+Ex/R+j58MkyYZ+t52mSDpmCnGbz5oZtR5ql XNZzG0xC4UwjGhUsSlw0z/S5/g8wVVDFttfuSgpX6GWmdAwJN7I/Hi0uUqXQK5s7YwVJ WIDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723463082; x=1724067882; 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=3HQActM+BLptsMrImlj7DHkTqMIVv1YB+ATfleAOoD4=; b=s4Z6oTrmTT6j95klntS19ruvWwe2XkqZVJWvSrdBCuX0rfMVqjNxJ4hBw7ZOydpNUT 8DJABPllsdMchoaGjXFsjxB5aZ9xQ4Hihk0wZfuAL62pY4a5jXdtEP/KNrAEehTpO8q7 tJRLXzKRYxkH5DXTTieIYQpvkPWo814zJN1DSwvHjFtu2DFqzwj8MZib77u4ziUnaHak cCSAMqYMfxzbuW4Un3AXds+yIqAehkRHVb7HAEWpg0ywxDl84aXvDnuMNxgx58RzfEX/ j2ma+Urh96TwocdIiXnEvlTJZNXmpEHdqqCp2kKWEYbuDPa/6mdFlHw36p6X5uRidFId qLPw== X-Forwarded-Encrypted: i=1; AJvYcCXI2F8BpJN/6ybzYW0jjAW8IaHTgQdMh3iR3orPXAxwaudXu2yDwt1ddzdGMra7yBU6z/BcWJiJxVTquX6v32i2aJYN/tR0dEtd80f0xR7pSg== X-Gm-Message-State: AOJu0YyQeWI6uOrutZkudtd9K4TtYjUIzrdF16d4drAXVsFEUBfvRzNv LYJ1PkRGyD0VusN9g4IuXF7bp/Z6cj+A3Mdn0RAKV5O3F949T77rVi2Rg5G7Wb0HoIMgFcoXQSU mAveKvgTN+3r2IsAs+3lOLL2nrJLwrw== X-Google-Smtp-Source: AGHT+IGdSChUK2CFlPWSN5Py9HIWib83nsWp1/5Vem95mjA76TDzWAcHVVFHHEjG4PtxWgm/M8SVMKG5XmbswcFSjOM= X-Received: by 2002:a17:907:d865:b0:a7a:aa35:408e with SMTP id a640c23a62f3a-a80aa5a7105mr628171266b.27.1723463081007; Mon, 12 Aug 2024 04:44:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Wasim Devale Date: Mon, 12 Aug 2024 17:14:28 +0530 Message-ID: Subject: Re: Data comparison To: Mukesh Rajpurohit Cc: kashi.zeeshan@gmail.com, usman.k@bitnine.net, hpt3009@gmail.com, pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000ba21bf061f7b0478" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ba21bf061f7b0478 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable also we can use pg_collector report Thanks, Wasim On Mon, 12 Aug, 2024, 5:09=E2=80=AFpm Mukesh Rajpurohit, wrote: > Hi Harish, > You can use EXCEPT operator for this purpose, i.e > (select * from source_table except select * from target_table;) and vice > versa. Thanks. > > On Mon, Aug 12, 2024, 4:47 PM Kashif Zeeshan > wrote: > >> Hi >> >> You can also use pgAdmin for schema comparison, please check the below >> link. >> >> >> https://www.pgadmin.org/docs/pgadmin4/8.8/schema_diff.html#:~:text=3DCli= ck%20on%20Schema%20Diff%20under,click%20on%20the%20Compare%20button >> . >> >> Thanks >> Kashif Zeeshan >> >> On Mon, Aug 12, 2024 at 3:48=E2=80=AFPM Muhammad Usman Khan >> wrote: >> >>> Dear Harish, >>> If you are referring to data validation then the following query might >>> give you the desired results >>> >>> /pg_dump -U postgres -s target -p 5334 > /tmp/db2_schema.sql ./pg_dump >>> -U postgres -s source > /tmp/db1_schema.sql diff /tmp/db1_schema.sql >>> /tmp/db2_schema.sql >>> >>> Adjust your ports and databases name accordingly >>> >>> Regards >>> Muhammad Usman Khan >>> >>> >>> >>> On Mon, 12 Aug 2024 at 15:41, Harish Harish wrote: >>> >>>> Dear Admins >>>> >>>> Is there any way to do data comparison for the database scheme in >>>> PostgreSQL between old version(10) and new version (15.0). >>>> >>>> Just migrated database from version 10 to 15. >>>> >>>> Much appreciate your help. >>>> >>>> Regards, >>>> Hari >>>> >>> --000000000000ba21bf061f7b0478 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

also we can use pg_collector report

Thanks,
Wasim


On Mon= , 12 Aug, 2024, 5:09=E2=80=AFpm Mukesh Rajpurohit, <vivasvan1902@gmail.com> wrote:

Hi Harish,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 You can use EXCEPT oper= ator for this purpose, i.e (select * from source_table except select * from= target_table;) and vice versa. Thanks.


On Mon= , Aug 12, 2024, 4:47 PM Kashif Zeeshan <kashi.zeeshan@gmail.com= > wrote:
Hi=C2= =A0

You can also use pgAdmin for schema comparison, plea= se check the below link.


Thanks
Kashif Ze= eshan

On Mon, Aug 12, 2024 at 3:48=E2=80=AFPM Muhammad Usman Khan <= usman.k@bitnine.net> wrote:
Dear=C2=A0Harish,
If you are referring=C2=A0to data validation= =C2=A0then the following query might give you the desired results

/pg_dump -U postgres -s targe= t -p 5334 > /tmp/db2_schema.sql ./pg_dump -U postgres -s source > /tmp/db1_schema.sql diff /tmp/db1_schema.sql /tmp/db2_schema.sql

Adjust your ports and databases name accordingly

Regards
Muhammad U= sman Khan


On Mon, 12 Aug 2024 at 15:41, Harish Harish <hpt3009@gmail.c= om> wrote:
Dear Admins

Is there any way to do data comparison for the database scheme in Postgre= SQL between old version(10) and new version (15.0).
=
Just migrated database from version 10 to 15.

Much appreciate your=C2= =A0help.

Regards,
<= div dir=3D"auto">Hari
--000000000000ba21bf061f7b0478--