Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys - Mailing list pgsql-admin

From Tom Lane
Subject Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
Date
Msg-id 29957.1051304193@sss.pgh.pa.us
Whole thread Raw
In response to After restoring a database using pg_restore , cannot insert or update records in tables with primary keys  (vikas.dogra@tabs.toshiba.com (Vikas))
Responses Suggestions?  (Naomi Walker <nwalker@eldocomp.com>)
List pgsql-admin
vikas.dogra@tabs.toshiba.com (Vikas) writes:
> We backup and restore Postgres databases using pg_dump and pg_restore.
> Though pg_restore process does not throw any exception but After using
> it for restoring we are not able to insert or update records in the
> tables having Primary Keys. The message we get is "The primary key is
> not a btree."

Do you mean "Index <foo> is not a btree"?  That's the closest match
I can find in the sources.

This implies that the version code stored in the first page of an index
is wrong.  If you see this without having gone through spectacular
failures (system crashes) then I'd have to bet that there is something
very flaky about your hardware.  Run some hardware diagnostics ---
memtest86 and badblocks are often recommended.  (Note that badblocks has
been known to miss disk failures unless run in its "destructive" test
mode...)

            regards, tom lane


pgsql-admin by date:

Previous
From: Kris Kiger
Date:
Subject: Problem restoring a table from 7.2.1 to 7.3.2
Next
From: Naomi Walker
Date:
Subject: Suggestions?