Re: Extra files in "base" dir not seen in relfilenodes

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel Farina <daniel(at)fdr(dot)io>, pgsql-general(at)postgresql(dot)org
Subject: Re: Extra files in "base" dir not seen in relfilenodes
Date: 2018-01-17 17:23:01
Message-ID: 20180117172301.spk23j2tj6pq3qdo@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

If it turns out that a shared buffer exists for any of those files, what
would be a way to evict them without pain?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-01-17 17:35:43 Re: Extra files in "base" dir not seen in relfilenodes
Previous Message Tom Lane 2018-01-17 17:16:19 Re: ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100