pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: vikas.dogra@tabs.toshiba.com
Cc: pgsql-admin@postgresql.org
Subject: Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
Date: Fri, 25 Apr 2003 16:56:33 -0400
Message-ID: <29957.1051304193@sss.pgh.pa.us> (raw)
In-Reply-To: <295585d4.0304231015.49a83e95@posting.google.com>
References: <295585d4.0304231015.49a83e95@posting.google.com>

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




view thread (2+ messages)

Message-ID: <29957.1051304193@sss.pgh.pa.us>
Permalink:  ../29957.1051304193@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29957.1051304193@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, vikas.dogra@tabs.toshiba.com
  Subject: Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
  In-Reply-To: <29957.1051304193@sss.pgh.pa.us>
  References: <295585d4.0304231015.49a83e95@posting.google.com> <29957.1051304193@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox