From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wim Kerkhoff <wim@nyetwork.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_class / missing tables
Date: Tue, 14 Sep 2004 02:17:37 -0400
Message-ID: <3144.1095142657@sss.pgh.pa.us> (raw)
In-Reply-To: <414657CA.5040809@nyetwork.org>
References: <414657CA.5040809@nyetwork.org>
Wim Kerkhoff <wim@nyetwork.org> writes:
> Short story: server was rebooted without being shut down properly, upon
> bootup PostgreSQL (7.4.3) starts fine, but a couple of data tables
> (along with their associated indexes and sequences) are gone. Other
> tables are still there.
Hmm. What *exactly* happens when you try
select * from pg_class where relname = 'missing_table_name';
Also, let's see the error log from when you tried to restart the server
after the crash.
> What's interested is that if I try:
> CREATE TABLE missing_table_name (foo int);
> It does complain that the table already exists...
You sure it's not complaining that the type already exists?
> What's happening here?
I'm suspicious that you've got a damaged block of pg_class. It would
make sense that that would take out several rows created at about the
same time, which would explain the fact that the lost items seem closely
related.
If you had *no* other lossage, you might be able to recover by
recreating the tables with the exact same schemas, and then copying the
old data files over these tables' data files. But there are enough
gotchas in this idea that "restore from backup" is probably a better
answer.
regards, tom lane
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, wim@nyetwork.org
Subject: Re: pg_class / missing tables
In-Reply-To: <3144.1095142657@sss.pgh.pa.us>
References: <414657CA.5040809@nyetwork.org> <3144.1095142657@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