pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
4+ messages / 3 participants
[nested] [flat]

* need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
@ 2023-10-27 08:56  Y_esteembsv-forum <esteembsv-forum@yahoo.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Y_esteembsv-forum @ 2023-10-27 08:56 UTC (permalink / raw)
  To: FN_pgsql-general@lists.postgresql.org LN_pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general

Hi 
Need SQL logic/different approach method's  to find out way's a) to Implement check sum to validate table data is migrated correctly  

Any guidance
RegardsBharani SV

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
@ 2023-10-27 09:34  Thiemo Kellner <thiemo@gelassene-pferde.biz>
  parent: Y_esteembsv-forum <esteembsv-forum@yahoo.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Thiemo Kellner @ 2023-10-27 09:34 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hi

Why do you need checksums? Can you not employ a full outer join? My 
though behind this is that checksumming is quite costly cpuwise and you 
have to fiddle with each and every relevent column, be it as part of the 
checksum string be it as part of the joiner. The joiner would have the 
advantage that you could, if you wanted, also implement logic to tell 
you precisely in which columns the difference is encountered.

Kind regards

Thiemo

Am 27.10.2023 um 10:56 schrieb Y_esteembsv-forum:
> Hi
> Need SQL logic/different approach method's  to find out way's
> a) to Implement check sum to validate table data is migrated correctly
>
> Any guidance
>
> Regards
> Bharani SV

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
@ 2023-10-27 10:21  Ron <ronljohnsonjr@gmail.com>
  parent: Thiemo Kellner <thiemo@gelassene-pferde.biz>
  0 siblings, 0 replies; 4+ messages in thread

From: Ron @ 2023-10-27 10:21 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org


OP might be referring to migrating from, say, Oracle to Postgresql when 
oracle_fdw is not available.

On 10/27/23 04:34, Thiemo Kellner wrote:
>
> Hi
>
> Why do you need checksums? Can you not employ a full outer join? My though 
> behind this is that checksumming is quite costly cpuwise and you have to 
> fiddle with each and every relevent column, be it as part of the checksum 
> string be it as part of the joiner. The joiner would have the advantage 
> that you could, if you wanted, also implement logic to tell you precisely 
> in which columns the difference is encountered.
>
> Kind regards
>
> Thiemo
>
> Am 27.10.2023 um 10:56 schrieb Y_esteembsv-forum:
>> Hi
>> Need SQL logic/different approach method's  to find out way's
>> a) to Implement check sum to validate table data is migrated correctly
>>
>> Any guidance
>>
>> Regards
>> Bharani SV

-- 
Born in Arizona, moved to Babylonia.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly
@ 2023-10-27 10:28  Ron <ronljohnsonjr@gmail.com>
  parent: Y_esteembsv-forum <esteembsv-forum@yahoo.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Ron @ 2023-10-27 10:28 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 10/27/23 03:56, Y_esteembsv-forum wrote:
> Hi
> Need SQL logic/different approach method's  to find out way's
> a) to Implement check sum to validate table data is migrated correctly

When migrating from Oracle to PostgreSQL, on both the Oracle side and the 
Postgresql side, I dumped each table (for the big ones, I split them into 
views) as a tab-separated value file ordered by the primary key and piped 
that into md5sum.

Had to play a few games with capitalization in blob/bytea columns

That way, I could verify that each table's data was identical.

-- 
Born in Arizona, moved to Babylonia.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2023-10-27 10:28 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27 08:56 need SQL logic to find out way's to Implement check sum to validate table data is migrated correctly Y_esteembsv-forum <esteembsv-forum@yahoo.com>
2023-10-27 09:34 ` Thiemo Kellner <thiemo@gelassene-pferde.biz>
2023-10-27 10:21   ` Ron <ronljohnsonjr@gmail.com>
2023-10-27 10:28 ` Ron <ronljohnsonjr@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox