pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedAfter restoring a database using pg_restore , cannot insert or update records in tables with primary keys
2+ messages / 2 participants
[nested] [flat]
* After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
@ 2003-04-23 18:15 Vikas <vikas.dogra@tabs.toshiba.com>
0 siblings, 1 reply; 2+ messages in thread
From: vikas.dogra@tabs.toshiba.com @ 2003-04-23 18:15 UTC (permalink / raw)
To: pgsql-admin
We are using Postgres Version 7.3.2
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."
When we run postgres in Debug mode then this problem does not come.
The same code of backup restore was working for postgres version 7.2.
Any ideas?
Thanks
Vikas
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: After restoring a database using pg_restore , cannot insert or update records in tables with primary keys
@ 2003-04-25 20:56 Tom Lane <tgl@sss.pgh.pa.us>
parent: Vikas <vikas.dogra@tabs.toshiba.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-04-25 20:56 UTC (permalink / raw)
To: vikas.dogra@tabs.toshiba.com; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-04-25 20:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 18:15 After restoring a database using pg_restore , cannot insert or update records in tables with primary keys Vikas <vikas.dogra@tabs.toshiba.com>
2003-04-25 20:56 ` Tom Lane <tgl@sss.pgh.pa.us>
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