Skip site navigation (1) Skip section navigation (2)

Re: Data corruption while taking backup of database

From: Pushker Chaubey <pchaubey(at)vertex(dot)co(dot)in>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Data corruption while taking backup of database
Date: 2008-06-26 10:20:19
Message-ID: 48636D63.8070308@vertex.co.in (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi Tom,

We actually follow the following order while doing restore

1) disable triggers
2) drop the foreign key constraints only
3) truncate all the existing tables
4) do the restore
5) recreate the constraints
6) enable triggers

Regards,
Pushker Chaubey


Tom Lane wrote:
> Pushker Chaubey <pchaubey(at)vertex(dot)co(dot)in> writes:
>   
>> We took back up of a database using the following command
>> pg_dump -a
>>     
>
>   
>> In the back up file that was generated we found some data that was 
>> violating foreign key constraints. And there fore we were not able to 
>> restore database back with this back up file.
>>     
>
> Was the data actually erroneous, or just loaded in the wrong order
> (ie, referencing table before referenced one)?  pg_dump -a doesn't
> guarantee to use a safe reload order.
>
> 			regards, tom lane
>
>   


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy the original message all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

Please do not print this email unless it is absolutely necessary.

In response to

pgsql-jdbc by date

Next:From: Daniel MigowskiDate: 2008-06-26 14:36:57
Subject: Re: Data corruption while taking backup of database
Previous:From: Tom LaneDate: 2008-06-25 21:20:04
Subject: Re: Data corruption while taking backup of database

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group