Re: pg_dump data integrity & java - Mailing list pgsql-hackers

From Philip Warner
Subject Re: pg_dump data integrity & java
Date
Msg-id 3.0.5.32.20010206094801.00913e40@mail.rhyme.com.au
Whole thread Raw
In response to pg_dump data integrity & java  ("Peter Schmidt" <peterjs@home.com>)
Responses Re: pg_dump data integrity & java  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 11:09 5/02/01 -0800, Peter Schmidt wrote:
>
>If I pg_dump a single table which has a foreign key constraint, and
>subsequently backup the constraint table, won't the data be out of sync?
>Each pg_dump will run in it's own transaction, right?

Yes.


>Is there a way to dump multiple tables within a single transaction without
>having to dump the entire database? If not, is it plausible for me to add
>this option i.e. pg_dump -t <array_of_tables> ?

The version in 7.1 should allow '-t *' or '--tables' which will dump all
tables. The ability to dump selected tables was not seen as a high priority.


>What happens when I restore if the data is out of sync?

If it is dumped as inserts you will get RI errors. If done via copy then
some but not all constraints will be evaluated - I think that COPY does not
fire triggers.


>As an aside, the current documentation does not reflect all of the pg_dump
>options, specifically the "-f" option which will cause pg_dump to output to

Current docs do cover -f. Maybe you are looking at 7.0 docs?



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Foreign keys and deferrable
Next
From: "Oliver Elphick"
Date:
Subject: Re: Re: [BUGS] syslog logging setup broken?