Re: Less available diskspace after crashed CLUSTER - Mailing list pgsql-admin

From Sander Steffann
Subject Re: Less available diskspace after crashed CLUSTER
Date
Msg-id 005601c4fb54$581d0ce0$64c8a8c0@balefirehome
Whole thread Raw
In response to Less available diskspace after crashed CLUSTER  ("Sander Steffann" <sander@steffann.nl>)
List pgsql-admin
Hi,

Sorry for replying to myself, but I had to point out that:

>> I'm guessing that the new table/index files created during the CLUSTER
>> didn't get released after the PANIC.  Look for files that are not
>> referenced by any relfilenode value in pg_class.
>
> Using the oid2name tool I get this:
> [...]
> I suspect all the files with "No tables with that oid found" can be
> removed, but I don't know exactly how oid2name works, so I'll check them
> against pg_class before removing them.

This is ofcourse not a good idea. There is quite a difference between the
oid and the relfilenode. Comparing the output of:
 SELECT DISTINCT relfilenode FROM pg_class ORDER BY relfilenode;
to the directory listing gave a much better result.

The files I found in this way also had an atime which was the same as the
time of the crash.

Just to prevent someone else from making the mistake I made in my previous
message...

Thanks!
Sander.



pgsql-admin by date:

Previous
From: "Sander Steffann"
Date:
Subject: Re: Less available diskspace after crashed CLUSTER
Next
From: Dick Davies
Date:
Subject: Re: PAM ldap