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

From: Daniel Farina <daniel(at)fdr(dot)io>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Extra files in "base" dir not seen in relfilenodes
Date: 2018-01-16 23:08:35
Message-ID: CACN56+Pb+XH_8iu=jcmAk4QcuGwahHY7geft14jaAZk6T-48oA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 16, 2018 at 3:04 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Daniel Farina <daniel(at)fdr(dot)io> writes:
> > I am looking at a database with a wide (~500G) divergence between the
> total
> > space expended by the database directory and the result of select
> > sum(pg_relation_size(oid)) from pg_class;.
>
> Odd.
>
> > I located about 280G of apparent extra space by performing an anti-join
> > between files on disk and files in the catalog via the
> pg_class.relfilenode
> > field.
>
> Umm ... are you accounting for catalogs that have zeroes in
> pg_class.relfilenode? It's generally better to rely on the
> pg_relation_filenode(oid) function than the raw column contents.
>

Yeah, the catalogs are not considered here (oids < 10000). The oids in
question are rather high. Let me re-run the antijoin with the function
though....

Indeed, same result.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-01-16 23:18:23 Re: Extra files in "base" dir not seen in relfilenodes
Previous Message Tom Lane 2018-01-16 23:03:58 Re: Extra files in "base" dir not seen in relfilenodes