From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dimitrios Apostolou <jimis@gmx.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Orphan files filling root partition after crash
Date: Wed, 28 Feb 2024 21:16:33 +0100
Message-ID: <f05f2f752535e8a9c1a1c4bee3d87f1704e69cbd.camel@cybertec.at> (raw)
In-Reply-To: <5233ff6e-f363-92a4-aa18-7a9392d35ad7@gmx.net>
References: <d15a32be-915e-3cd8-4622-5a052d621f13@gmx.net>
<b76197c602b3466c6f5a50185e38526d150288b5.camel@cybertec.at>
<5233ff6e-f363-92a4-aa18-7a9392d35ad7@gmx.net>
On Wed, 2024-02-28 at 20:30 +0100, Dimitrios Apostolou wrote:
> Lucky you. It should have been "relfilenode" rather than "oid",
> > and some catalog tables don't have their files listed in the catalog,
> > because they are needed *before* the database can access tables.
>
> I actually double checked that the filenames don't appear anywhere in
> SELECT * FROM pg_class
> and that the files were multi-GB in size including all the
> 1GB-pieces. But luck was definitely a part of the equation, I didn't know
> that the files might be accessed before tables (at db startup?) or that
> "relfilenode" would be more appropriate. Why is that, where can I read
> more? I see that many (but not all) rows in pg_class have oid=relfilenode
> but for many rows relfilenode=0 which is meaningless as filename.
If you are curious about such things, start reading the source.
The object ID is immutable, and initially the filenode is the save,
but it changes whenever the table is rewritten (TRUNCATE, ALTER TABLE,
VACUUM (FULL), ...).
Yours,
Laurenz Albe
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-general@postgresql.org
Cc: laurenz.albe@cybertec.at, jimis@gmx.net, pgsql-general@lists.postgresql.org
Subject: Re: Orphan files filling root partition after crash
In-Reply-To: <f05f2f752535e8a9c1a1c4bee3d87f1704e69cbd.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