From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Yan Chunlu <springrider(at)gmail(dot)com>, Edson Richter <richter(at)simkorp(dot)com(dot)br> |
Subject: | Re: how could duplicate pkey exist in psql? |
Date: | 2011-11-21 14:55:47 |
Message-ID: | 201111210655.48162.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Monday, November 21, 2011 6:39:55 am Yan Chunlu wrote:
> got it. thank you very much for you help. I found out this problem too
> late, and there is no backup.
>
> luckily there was not too much data for this, and my app keeps running
> without error.
>
> I am not sure if they are related but I could not use pg_restore to import
> data dumped by "pg_dump -Fc";
>
> pg_restore will print some error message about "duplicate primary key", and
> the table is empty. no data has been imported.
>
> pg_restore supposed to import the data and ignore the errors. does any
> one have the similar problem?
>
pg_restore may ignore the error and keep on going but the database will not. In
other words when pg_restore receives the error it will continue on to the next
item (unless you have the -e switch on). As far as the server(database) is
concerned duplicate primary key is still an error and the data will not be
loaded.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2011-11-21 15:39:57 | Re: How to write a own parser for full text search |
Previous Message | Simon Riggs | 2011-11-21 14:47:40 | Re: wal archiving on a hot-standby server |