Re: Failed CLUSTER seems to leave files behind - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Failed CLUSTER seems to leave files behind
Date
Msg-id 22050.1131030196@sss.pgh.pa.us
Whole thread Raw
In response to Failed CLUSTER seems to leave files behind  (Antti Salmela <asalmela@iki.fi>)
Responses Re: Failed CLUSTER seems to leave files behind  (Antti Salmela <asalmela@iki.fi>)
List pgsql-bugs
Antti Salmela <asalmela@iki.fi> writes:
> Failed CLUSTER due to insufficient disk space seems to leave temporary files
> behind at least on 7.4.7.

What was the "failure" exactly?  If you ran out of disk space for the
data files, I'd have expected it to reclaim the temp files.  On the
other hand, running out of disk space for WAL would lead to a
database-wide PANIC, and there's no mechanism for getting rid of
unreferenced files after a PANIC.  (IIRC this is intentional ---
deleting files that we think aren't used seems too risky.)

This is one of several reasons for keeping WAL and data on separate
disks ...

> Is it safe to remove these files manually?

Yeah, if you're sure they correspond to no pg_class.relfilenode entry.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Ivan
Date:
Subject: Re: pg_dumpall bug & feature request
Next
From: Tom Lane
Date:
Subject: Re: BUG #2017: column labels ignored on selects from views