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

2018-01-17 Thread Tom Lane
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 su

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

2018-01-17 Thread Alvaro Herrera
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 catalo

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

2018-01-16 Thread Tom Lane
Daniel Farina writes: > On Tue, Jan 16, 2018 at 3:04 PM Tom Lane wrote: >> 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 c

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

2018-01-16 Thread Daniel Farina
On Tue, Jan 16, 2018 at 3:04 PM Tom Lane wrote: > Daniel Farina 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

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

2018-01-16 Thread Tom Lane
Daniel Farina 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 > be

Extra files in "base" dir not seen in relfilenodes

2018-01-16 Thread Daniel Farina
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;. I located about 280G of apparent extra space by performing an anti-join between files on disk and files in the ca