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 1sdT3D-00FoJA-8x for pgsql-admin@arkaria.postgresql.org; Mon, 12 Aug 2024 11:17:23 +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 1sdT3B-00F6zc-CS for pgsql-admin@arkaria.postgresql.org; Mon, 12 Aug 2024 11:17:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdT3A-00F6zU-TE for pgsql-admin@lists.postgresql.org; Mon, 12 Aug 2024 11:17:20 +0000 Received: from mail-vk1-xa2f.google.com ([2607:f8b0:4864:20::a2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sdT34-004L1Y-HC for pgsql-admin@lists.postgresql.org; Mon, 12 Aug 2024 11:17:19 +0000 Received: by mail-vk1-xa2f.google.com with SMTP id 71dfb90a1353d-4f5153a3a73so1413652e0c.2 for ; Mon, 12 Aug 2024 04:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723461433; x=1724066233; 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=YzdFeFOXoonxVPv4CO0Dp132Tlk7MPI4yMzlfldScMk=; b=XGfZ6YE6bDbvfC4N0tiT9eWARgk7dQUqPY1ZW9pwLRL8zt+4WD5OcvvoqRTI3/52Fw 8mF3k9xgin515KTnhvm0IOUvfqXOd7xnrnydh7KIvlc4Kr1C1lJ/gCWx7MBWM8rHFV6a dLqxtmJ/AqHeKAP/FkAzm+RSEZlqHMMSaVB63jBOgU11bywcciucfkqtiCepW5DE3MHX EulIFi4pXyAcABcoqekzaZFcmP/bCNG/TM14vP6WDSLTSHha7RCELiKL4GgoT071W03W dro2ZOTvDOdKuFGIK/ArQ0w8gLjTes0hkHEktJ39Je6E55e4c3wKrOmSILZyMSJ94bT6 L4JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723461433; x=1724066233; 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=YzdFeFOXoonxVPv4CO0Dp132Tlk7MPI4yMzlfldScMk=; b=uGWy8Uao56bvYSHY0dQDHSAVUDSktNZoS1cfXKLKBtxV3KU5j7tSuQ6yTPSG1xFOi7 D3ZrUVvfF1I49Sm4ioEyHtLi+wMsQfKQI4eS1lifAFRh8/tsJ/sDUW1O/FRbyjk3FZIs kbxc/MNK3av/iVBCPhuXcHPrAxN3FaSTD6pibnSXK929TZZdYsposLQHysJJ+8ANGoZN cSCvRVizqNGi0DWFJouwhIfSGVW0zbSXq60BwiPRHObFjGzsP7jfoalaaLclML15Lzw7 82gQaU745TOKGslvCxpPYqzF/VA3CkgZ2JxJclN84ZOB7roY3tTaoEPe861DFFYiCf88 oYDA== X-Forwarded-Encrypted: i=1; AJvYcCXJkZT5CR42fwdneEVaTWbzXbCpTeA6QRlG8tFyKith5lef/4+RhIhOLzMGfFYg+QUYlvaBDjWqE8LJOKHrbr+ElkQvio5pG77tE5NXkpk8kQ== X-Gm-Message-State: AOJu0YyyfC4dSz9bkOmpvCZIA0z/zjhOXVqZ5shPm6y3AbqCfCImpgTr Jy8pXkR5ghPO57g3KySNzfmHotz/Mo5LVt38sWZEhM36F/gHW2HqeSy6+/Oph7EAug3bP4ABM+q JF6TMUa0D4zK5407SA+cL3zqwjV0= X-Google-Smtp-Source: AGHT+IFU+cyy9ukDJiXEgTW68upPe2KnBdAZG3P/Mv2CUdUT8ibSDRw68SujFsL31Dh2/4UJneum6AVrUn7R7yWEDD4= X-Received: by 2002:a05:6122:2008:b0:4ef:6870:ff5 with SMTP id 71dfb90a1353d-4fabeee87d0mr74015e0c.5.1723461433409; Mon, 12 Aug 2024 04:17:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kashif Zeeshan Date: Mon, 12 Aug 2024 16:17:01 +0500 Message-ID: Subject: Re: Data comparison To: Muhammad Usman Khan Cc: Harish Harish , pgsql-admin@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000085c8d7061f7aa264" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000085c8d7061f7aa264 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3DClick%= 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 >> > --00000000000085c8d7061f7aa264 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0

You can also use pgAdmin for s= chema comparison, please check the below link.


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.com> wrote:
Dear Admin= s

Is there any way to do data = comparison for the database scheme in PostgreSQL between old version(10) an= d new version (15.0).

Ju= st migrated database from version 10 to 15.

Much appreciate your=C2=A0help.
=
Regards,
Hari
--00000000000085c8d7061f7aa264--