From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Mladen Gogala <gogala.mladen@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: vacuumlo
Date: Mon, 30 Aug 2021 21:17:15 +0200
Message-ID: <22b33dc4789bb9ff9b260407d02cd83837c4a3b7.camel@cybertec.at> (raw)
In-Reply-To: <edb97021-ca64-a0e2-0181-f1eb280c9c58@gmail.com>
References: <DBAPR08MB5687F490FBCC6065B1F6224BC0FE9@DBAPR08MB5687.eurprd08.prod.outlook.com>
<CAOBaU_YNAsTVHXS1UFw_XBt2YOZjwsJ3KMnZXrwqKb+86WAhpg@mail.gmail.com>
<DBAPR08MB5687AE8E62995E251E23E26BC0CB9@DBAPR08MB5687.eurprd08.prod.outlook.com>
<9395a02bc37b8c7a3ca09441d288ff49e1c19c39.camel@cybertec.at>
<edb97021-ca64-a0e2-0181-f1eb280c9c58@gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, gogala.mladen@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: vacuumlo
In-Reply-To: <22b33dc4789bb9ff9b260407d02cd83837c4a3b7.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox