Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vikas(dot)dogra(at)tabs(dot)toshiba(dot)com (Vikas)
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
Date: 2003-04-25 20:56:33
Message-ID: 29957.1051304193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

vikas(dot)dogra(at)tabs(dot)toshiba(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Naomi Walker 2003-04-25 21:51:50 Suggestions?
Previous Message Kris Kiger 2003-04-25 20:45:28 Problem restoring a table from 7.2.1 to 7.3.2