Re: Select hangs and there are lots of files in table and index directories. - Mailing list pgsql-performance

From Tom Lane
Subject Re: Select hangs and there are lots of files in table and index directories.
Date
Msg-id 8188.1391032996@sss.pgh.pa.us
Whole thread Raw
In response to Re: Select hangs and there are lots of files in table and index directories.  (Peter Blair <petertblair@gmail.com>)
List pgsql-performance
Peter Blair <petertblair@gmail.com> writes:
> One other problem with this case, those 900K worth of files in each of the
> table and index directories (1.8M total files) are still hanging around.

Hm ... if left to its own devices, I think the session that created them
should have deleted them, assuming you did a normal query cancel on it.
Maybe you did kill -9?

> Just a guess, but do I shutdown the database, and delete any file not
> listed in pg_class?

For starters, try just stopping and starting the database; I think there
might be logic to remove orphaned files during postmaster startup.

If that doesn't work, you can get rid of any numeric-named files that
match no value in pg_class.relfilenode of their database.

            regards, tom lane


pgsql-performance by date:

Previous
From: jugnooken
Date:
Subject: WHERE with ORDER not using the best index
Next
From: Tom Lane
Date:
Subject: Re: WHERE with ORDER not using the best index