Im using a Postgresql-9.2 on Centos 6.7. I tried to upgrade the PostgreSQL using --link. After that, I took a table backup and tried to restore this on Dev server. But Im getting an error like,

ERROR: duplicate key value violates unique constraint "table_pkey"

Then I tried to query the actual database, and I can see the primary key value twice.

And tried to reindex and got this error.

WARNING:  concurrent delete in progress within table "table"
ERROR:  could not access status of transaction 3769823
DETAIL:  Could not open file "pg_subtrans/E0B2": No such file or directory.
CONTEXT:  while checking uniqueness of tuple (13075,93) in relation "table"

Also disabled the wal log, cleaned the wal log files and reset the xlog.

I just wanted to why happened and how to fix them?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.