----__--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]
"><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--__----


|