TOC errors

From: Perry Smith <pedzsan(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: TOC errors
Date: 2013-08-02 17:29:57
Message-ID: 82A06F4A-4EF9-4776-8B1C-866B8E0F70E7@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am doing a restore:

pg_restore --no-owner -L /tmp/db.list --single-transaction --dbname=condor3_production $DBFILE

and I get this error:

pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2056; 0 35202 TABLE DATA adv_ptf_release_maps pedzan
pg_restore: [archiver (db)] COPY failed: ERROR: duplicate key value violates unique constraint "adv_ptf_release_maps_apar_defect_version_map_id_ptf_id_rele_key"
DETAIL: Key (apar_defect_version_map_id, ptf_id, release_id)=(72022, 16678, 436) already exists.
CONTEXT: COPY adv_ptf_release_maps, line 651290: "651290 72022 16678 436 2009-06-07 14:08:55.627762 2009-06-07 14:08:55.627762"

I've used the custom format. The error tells me a line number but I can't look at it. Is there a way that I can convert the custom format to something I can view?

Also, I have turned off all the foreign key checking while I was doing the restore but I guess this is the unique checking that is causing the error. Can I turn that off (without doing a table modify)?

Thank you,
Perry

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Tipton 2013-08-02 17:45:04 Re: Identify primary key in simple/updatable view
Previous Message Bosco Rama 2013-08-02 16:56:41 Re: Understanding database schemas