Re: pg_dump data integrity & java

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump data integrity & java
Date: 2001-02-05 22:48:01
Message-ID: 3.0.5.32.20010206094801.00913e40@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2001-02-05 22:56:12 Re: [HACKERS] Re: syslog logging setup broken?
Previous Message Stephan Szabo 2001-02-05 22:20:30 Foreign keys and deferrable