Re: vacuumlo - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: vacuumlo
Date
Msg-id 22b33dc4789bb9ff9b260407d02cd83837c4a3b7.camel@cybertec.at
Whole thread Raw
In response to Re: vacuumlo  (Mladen Gogala <gogala.mladen@gmail.com>)
List pgsql-admin
On Mon, 2021-08-30 at 13:38 -0400, Mladen Gogala wrote:
> According to unsubstantiated rumors from https://www.postgresql.org/docs/13/catalog-pg-class.html,
> the definition of RELFILENODE column is as follows:
>
>  relfilenode oid
>
> Name of the on-disk file of this relation; zero means this is a “mapped” relation whose disk
> file name is determined by low-level state
> Change of the RELFILENODE means that the relation has got a new file. And that means that vacuum full
> rewrites the table, just as Laurenz has said. Note that OID itself is NOT changed.

Please don't top-post on these lists.

I am not sure what you mean with "unsubstantiated".

Note that this will be 0 for certain crucial system tables (essentially those that have to be accessed
*before* regular metadata queries can be executed).  So it is better to use the "pg_relation_filenode()"
function to find the file that belongs to a certain table.

You can use that to find which files do *not* belong to any table, index, sequence or
materialized view and then delete those.  But I would think twice before manually deleting
files in the data directory.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-admin by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: vacuumlo
Next
From: Atul Kumar
Date:
Subject: Re: vacuumlo