Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Re: Data corrup...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 1981 of 2064
Post > Topic >>

Re: Data corruption while taking backup of database

by pchaubey@[EMAIL PROTECTED] (Pushker Chaubey) Jun 26, 2008 at 03:50 PM

----__--PART--13315.0951304663--__--
Content-Type: text/plain;
	charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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@[EMAIL PROTECTED]
> writes:
>=20=20=20
>> We took back up of a database using the following command
>> pg_dump -a
>>=20=20=20=20=20
>
>=20=20=20
>> In the back up file that was generated we found some data that was=20
>> violating foreign key constraints. And there fore we were not able
to=20
>> restore database back with this back up file.
>>=20=20=20=20=20
>
> 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
>
>=20=20=20

=0D
The information contained in this electronic message and any attachments
to=
 this message are intended for the exclusive use of the addressee(s) and
ma=
y contain proprietary, confidential or privileged information. If you are
n=
ot the intended recipient, you should not disseminate, distribute or copy
t=
his e-mail. Please notify the sender immediately and destroy the original
m=
essage all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
shoul=
d check this email and any attachments for the presence of viruses. The
com=
pany 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.=

----__--PART--13315.0951304663--__--
Content-Type: text/html;
	charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content=3D"text/html;charset=3DISO-8859-1"
http-equiv=3D"Content-Ty=
pe">
  <title></title>
</head>
<body bgcolor=3D"#ffffff" text=3D"#000000">
Hi Tom,<br>
<br>
We actually follow the following order while doing restore<br>
<br>
1) disable triggers<br>
2) drop the foreign key constraints only<br>
3) truncate all the existing tables<br>
4) do the restore<br>
5) recreate the constraints<br>
6) enable triggers<br>
<br>
Regards,<br>
Pushker Chaubey<br>
<br>
<br>
Tom Lane wrote:
<blockquote cite=3D"mid23665.1214428804@[EMAIL PROTECTED]
" type=3D"cite">
  <pre wrap=3D"">Pushker Chaubey <a class=3D"moz-txt-link-rfc2396E"
href=3D=
"mailto:pchaubey@[EMAIL PROTECTED]
">&lt;pchaubey@[EMAIL PROTECTED]
> writes:
  </pre>
  <blockquote type=3D"cite">
    <pre wrap=3D"">We took back up of a database using the following
command
pg_dump -a
    </pre>
  </blockquote>
  <pre wrap=3D""><!---->
  </pre>
  <blockquote type=3D"cite">
    <pre wrap=3D"">In the back up file that was generated we found some
dat=
a that was=20
violating foreign key constraints. And there fore we were not able to=20
restore database back with this back up file.
    </pre>
  </blockquote>
  <pre wrap=3D""><!---->
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

  </pre>
</blockquote>
<br>


<br>=0D
The information contained in this electronic message and any attachments
to=
 this message are intended for the exclusive use of the addressee(s) and
ma=
y contain proprietary, confidential or privileged information. If you are
n=
ot the intended recipient, you should not disseminate, distribute or copy
t=
his e-mail. Please notify the sender immediately and destroy the original
m=
essage all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
shoul=
d check this email and any attachments for the presence of viruses. The
com=
pany 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.</body></h=
tml>=

----__--PART--13315.0951304663--__----
 




 7 Posts in Topic:
Data corruption while taking backup of database
pchaubey@[EMAIL PROTECTED  2008-06-25 14:17:11 
Re: Data corruption while taking backup of database
pchaubey@[EMAIL PROTECTED  2008-06-25 14:22:27 
Re: Data corruption while taking backup of database
heikki@[EMAIL PROTECTED]   2008-06-25 12:51:10 
Re: Data corruption while taking backup of database
pchaubey@[EMAIL PROTECTED  2008-06-25 15:38:28 
Re: Data corruption while taking backup of database
dmigowski@[EMAIL PROTECTE  2008-06-26 16:36:57 
Re: Data corruption while taking backup of database
tgl@[EMAIL PROTECTED] (T  2008-06-25 17:20:04 
Re: Data corruption while taking backup of database
pchaubey@[EMAIL PROTECTED  2008-06-26 15:50:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 2:19:31 CDT 2008.