Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8dED-0004PT-Rl for pgsql-performance@arkaria.postgresql.org; Wed, 29 Jan 2014 22:03:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W8dED-0003vG-Ah for pgsql-performance@arkaria.postgresql.org; Wed, 29 Jan 2014 22:03:25 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8dEC-0003ur-8W for pgsql-performance@postgresql.org; Wed, 29 Jan 2014 22:03:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8dE6-0005yf-7C for pgsql-performance@postgresql.org; Wed, 29 Jan 2014 22:03:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s0TM3GSP008189; Wed, 29 Jan 2014 17:03:16 -0500 From: Tom Lane To: Peter Blair cc: pgsql-performance@postgresql.org Subject: Re: Select hangs and there are lots of files in table and index directories. In-reply-to: References: <27362.1390869815@sss.pgh.pa.us> Comments: In-reply-to Peter Blair message dated "Wed, 29 Jan 2014 14:12:33 -0500" Date: Wed, 29 Jan 2014 17:03:16 -0500 Message-ID: <8188.1391032996@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Peter Blair 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 -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance