Re: Select hangs and there are lots of files in table and index directories.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Blair <petertblair(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Select hangs and there are lots of files in table and index directories.
Date: 2014-01-29 22:03:16
Message-ID: 8188.1391032996@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Peter Blair <petertblair(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2014-01-29 23:15:55 Re: WHERE with ORDER not using the best index
Previous Message jugnooken 2014-01-29 21:19:17 WHERE with ORDER not using the best index