Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebrcs-0006ug-Hm for pgsql-general@arkaria.postgresql.org; Wed, 17 Jan 2018 17:35:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ebrcs-0007eM-37 for pgsql-general@arkaria.postgresql.org; Wed, 17 Jan 2018 17:35:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ebrcr-0007eC-O6 for pgsql-general@lists.postgresql.org; Wed, 17 Jan 2018 17:35:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ebrcp-0003Mf-CD for pgsql-general@postgresql.org; Wed, 17 Jan 2018 17:35:48 +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 w0HHZhEq009189; Wed, 17 Jan 2018 12:35:44 -0500 From: Tom Lane To: Alvaro Herrera cc: Daniel Farina , pgsql-general@postgresql.org Subject: Re: Extra files in "base" dir not seen in relfilenodes In-reply-to: <20180117172301.spk23j2tj6pq3qdo@alvherre.pgsql> References: <20180117172301.spk23j2tj6pq3qdo@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 17 Jan 2018 14:23:01 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9187.1516210543.1@sss.pgh.pa.us> Date: Wed, 17 Jan 2018 12:35:43 -0500 Message-ID: <9188.1516210543@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > Tom Lane wrote: >> However, assuming you've gotten that detail right, then any file >> you can't match up with a relfilenode value must be an orphan you >> can just "rm". > Maybe look in pg_buffercache for entries referencing those files before > deleting. It would be surprising to see any if no catalog points to > those files, but who knows ... If you break checkpointing, you're not > going to be pleased. Even if there are any such entries, surely they ought to be clean by now and thus not a hazard. Not that a manual "CHECKPOINT" might not be a good idea. regards, tom lane