Recovering records after running out of disk space

From: Ken Ebling <ken(at)idealinter(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Recovering records after running out of disk space
Date: 2008-04-09 10:55:11
Message-ID: 3DDBD50A-119F-477B-B6A4-D31ACC5C49E2@idealinter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello.

I have a postgresql 8.2.4 server that ran low on disk space. I was
seeing messages
about some queries failing to run, and a hint about low disk space.

I noticed that the largest table in the database was returning 0 rows,
while other tables
just seemed to be missing some rows. One was missing about 10,000
records.

Running "SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;"
showed that the table with 0 rows is still the largest:

relname | relpages
-----------------------------------+----------
job_view_warehouse | 3013632

I moved the data directory to bigger drives, and ran "vacuum full" and
"reindex database db_name" and "select count(*) ..." still shows that
the table has 0 rows.

Is there something else I should do to try to recover these records? I
figure they must
still be there somewhere if it's relpages is so big.

Thanks in advance,

Ken

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew Sullivan 2008-04-09 13:14:48 Re: pg_dump/pg_restore
Previous Message Ashish Sharma 2008-04-09 08:10:55 SQL fast in PSQL, very slow using MS.NET driver