pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Decibel! <decibel@decibel.org>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pg_dump restore time and Foreign Keys
Date: Mon, 09 Jun 2008 12:10:34 -0400
Message-ID: <484D55FA.3050002@dunslane.net> (raw)
In-Reply-To: <1213026379.12046.119.camel@ebony.site>
References: <1212647003.19964.19.camel@ebony.site>
	<4847D4A7.70309@dunslane.net>
	<1212670595.19964.55.camel@ebony.site>
	<200806071308.00845.xzilla@users.sourceforge.net>
	<1212860515.12046.78.camel@ebony.site>
	<484ADAD4.2080701@dunslane.net>
	<E2AE91BB-0FCE-44CE-AC3B-200D6F1DD0BC@decibel.org>
	<19362.1213023432@sss.pgh.pa.us>
	<1213024379.12046.111.camel@ebony.site>
	<484D4AE7.2050209@dunslane.net>
	<1213026379.12046.119.camel@ebony.site>



Simon Riggs wrote:
>> But we don't know it for dead sure, we only think we do. What if the 
>> data for one or other of the tables is corrupted? We'll end up with data 
>> we believe is consistent but in fact is not, ISTM. If you can somehow 
>> guarantee the integrity of data in both tables then we might be 
>> justified in assuming that the FK constraint will be consistent - that's 
>> why I suggested some sort of checksum mechanism might serve the purpose.
>>     
>
> Agreed.
>
> Can we get COPY to output the checksum of its output as part of the
> command tag? How else can we return the checksum? In $file.cksum for any
> given output file?
>   

It seems a reasonable idea to use the command tag, unless that's going 
to break lots of stuff. I think the only thing we can usefully checksum 
is the output lines in the client encoding.

> We can then use an explicit checksum option in the COPY when we reload,
> with CHECKSUM option.
>
>   

We need rather more than this to make sure your facility isn't abused. 
That's the part that I haven't been able to think of a good answer for 
(yet).

cheers

andrew



view thread (36+ messages)  latest in thread

Message-ID: <484D55FA.3050002@dunslane.net>
Permalink:  ../484D55FA.3050002@dunslane.net/
Also on:    postgresql.org/message-id/484D55FA.3050002@dunslane.net

 · 

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-hackers@postgresql.org
  Cc: andrew@dunslane.net, simon@2ndquadrant.com, tgl@sss.pgh.pa.us, decibel@decibel.org, xzilla@users.sourceforge.net
  Subject: Re: pg_dump restore time and Foreign Keys
  In-Reply-To: <484D55FA.3050002@dunslane.net>

* 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