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

pg_dump and errors

From: Ben-Nes Michael <miki(at)canaan(dot)co(dot)il>
To: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump and errors
Date: 2004-05-31 10:49:51
Message-ID: 00c001c446fc$fffa6780$0600000a@mikislap (view raw or flat)
Thread:
Lists: pgsql-general
Hello

Im getting strange errors when restoring data from pg_dump files:

ERROR:  duplicate key violates unique constraint "products_pkey"
CONTEXT:  COPY products, line 1: "98    Super Pak Ruby j&aacute;t&eacute;k      J-0001  1502450E       Szuper Pok&eacute;mon aj&aacute;nd&eacute;kcso..."
ERROR:  duplicate key violates unique constraint "attributes_pkey"
CONTEXT:  COPY attributes, line 1: "2   Width"
ERROR:  duplicate key violates unique constraint "prod_attributes_pkey"
CONTEXT:  COPY prod_attributes, line 1: "1038   23      12      "
ERROR:  duplicate key violates unique constraint "prod_images_pkey"
CONTEXT:  COPY prod_images, line 1: "73 14      \\377\\330\\377\\340\\000\\020JFIF\\000\\001\\001\\001\\000H\\000H\\000\\000\\377\\333\\000C\\..."
ERROR:  duplicate key violates unique constraint "manufacturer_images_pkey"
CONTEXT:  COPY manufacturer_images, line 1: "296        81      \\377\\330\\377\\340\\000\\020JFIF\\000\\001\\001\\001\\000H\\000H\\000\\000\\377\\376\\000&F..."

Im using pg 7.4.1 on woody ( debian ).
this is not the first time such hapens and i have a constant fear from backup failures.

once I even had to move a db from 7.3 to 7.4 and pg_dump returned me some errors on not existing tables ( ones which i deleted before )

this is the line i use ( i started to seperate the scheme from the data becouse its easier to me to edit the files if something happens )

/usr/bin/pg_dump -s -f /var/pg_dumps/db1 db1
/usr/bin/pg_dump -a -f /var/pg_dumps/db1 db1

Any ideas how to avoid such errors ( if possible at all ) ?

Thanks
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
Fax: 972-4-6990098
http://www.canaan.net.il
--------------------------

Responses

pgsql-general by date

Next:From: Pavel StehuleDate: 2004-05-31 13:09:55
Subject: ODBC, ADO, Return Value from SP problem
Previous:From: zuhans@iname.comDate: 2004-05-31 08:36:56
Subject: confused by superuser-definition

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