pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Corrupt DB 2+ messages / 2 participants [nested] [flat]
* Corrupt DB @ 2005-04-17 17:27 Simpson <asimpson@i-55.com> 2005-04-18 16:18 ` Re: Corrupt DB Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Simpson @ 2005-04-17 17:27 UTC (permalink / raw) To: pgsql-admin Greetings, I am running Postgresql 8.0 on "Linux xxx 2.4.18-14 #1 Wed Sep 4 12:13:11 EDT 2002 i686 athlon i386 GNU/Linux" and while loading data my program received: DBD::Pg::db do failed: server closed the connection unexpectedly ... Now I can't access any data in the DB, not even the \d command: mydb=# \d ERROR: could not identify an ordering operator for type name HINT: Use an explicit ordering operator or modify the query. I tried vacuum: mydb=# vacuum; ERROR: could not open relation 1663/12649295/16396: No such file or directory What would be the best way to fix this? How would I determine what caused the corruption and prevent it from happening again? Thanks for any assistance, Drew. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Corrupt DB 2005-04-17 17:27 Corrupt DB Simpson <asimpson@i-55.com> @ 2005-04-18 16:18 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2005-04-18 16:18 UTC (permalink / raw) To: Simpson <asimpson@i-55.com>; +Cc: pgsql-admin "Simpson" <asimpson@i-55.com> writes: > mydb=# vacuum; > ERROR: could not open relation 1663/12649295/16396: No such file or > directory > What would be the best way to fix this? [ checks catalogs... ] In 8.0.*, 16396 is pg_am which is basically constant, so you could replace that file by copying it out of another database, eg cp $PGDATA/base/1663/1/16396 $PGDATA/base/1663/12649295/16396 After that I would try a REINDEX DATABASE in a standalone backend, to repair any damage to the system catalog indexes. Then start the postmaster and see if you can pg_dump and reload the database. VACUUM is *not* a good idea if you have any doubts about the consistency of the database. It's quite likely though that there is more damage and that this procedure will not get you out of trouble :-(. You apparently have got either a flaky disk drive or severe kernel bugs, because files don't just disappear without cause. The kernel version you mentioned looks a bit old, so updating to something more recent would be a good idea. regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-04-18 16:18 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2005-04-17 17:27 Corrupt DB Simpson <asimpson@i-55.com> 2005-04-18 16:18 ` 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