pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-sql@postgresql.org
Subject: Re: Comparing two (largish) tables on different servers
Date: Wed, 10 Nov 2004 01:12:08 +0100
Message-ID: <opsg72uijkcq72hf@musicbox> (raw)
In-Reply-To: <71E37EF6B7DCC1499CEA0316A256832801D4BAB0@loki.wc.globexplorer.net>
References: <71E37EF6B7DCC1499CEA0316A256832801D4BAB0@loki.wc.globexplorer.net>

	Idea :
	Write a program which connects on the two databases, creates a cursor on  
each to return the rows in order, then compare them as they come (row 1  
 from cursor 1 == row 1 from cursor 2, etc). Fetch in batchs. If there's a  
difference you can then know which row.
	I hope you have an index to sort on, to save you a huge disk sort.

On Tue, 9 Nov 2004 14:41:00 -0800, Gregory S. Williamson  
<gsw@globexplorer.com> wrote:

> This is probably a silly question.
>
> Our runtime deployment of database servers (7.4) involves some  
> redundant/duplicate databases. In order to compare tables (about 5 gigs  
> each) on different servers I unload the things (takes a while etc.),  
> sort them with a UNIX sort and then do a cksum on them.
>
> Is there any way to do this from inside postgres that anyone knows of ?  
> I looked through the manual and the contrib stuff and didn't see much ...
>
> Thanks,
>
> Greg Williamson
> DBA
> GlobeXplorer LLC
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>





view thread (4+ messages)  latest in thread

Message-ID: <opsg72uijkcq72hf@musicbox>
Permalink:  ../opsg72uijkcq72hf@musicbox/
Also on:    postgresql.org/message-id/opsg72uijkcq72hf@musicbox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@boutiquenumerique.com
  Subject: Re: Comparing two (largish) tables on different servers
  In-Reply-To: <opsg72uijkcq72hf@musicbox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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