public inbox for [email protected]  
help / color / mirror / Atom feed
From: Philip Semanchuk <[email protected]>
To: Torsten Förtsch <[email protected]>
Cc: Mikael Petterson <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Disk is filling up with large files. How can I clean?
Date: Wed, 9 Oct 2024 09:02:38 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKkG4_krrgxcGgUFoWu56xAS9CinZdpf5nDBfkfm0Mqf-dr6aw@mail.gmail.com>
References: <GV1PR08MB83052D322AD3FB9A65125339B87E2@GV1PR08MB8305.eurprd08.prod.outlook.com>
	<CAKkG4_krrgxcGgUFoWu56xAS9CinZdpf5nDBfkfm0Mqf-dr6aw@mail.gmail.com>



> On Oct 9, 2024, at 5:52 AM, Torsten Förtsch <[email protected]> wrote:
> 
> Filenames like 16665, 16665.1, 16665.2 etc all represent the same table (or similar). The number 16665 is called the file node.
> 
> To get a list of file nodes for a specific database you can run:
> 
> SELECT oid::regclass::text, relfilenode FROM pg_class;
> 
> The /16384/ in the path represents the database. To decipher that you can run:
> 
> SELECT datname, oid FROM pg_database;
> 
> Once you have all that information, you know which database to connect to and which tables are big. Then you can DROP/DELETE/TRUNCATE or so.

Mikael, if you’re unaware of VACUUM FULL (as opposed to just VACUUM), you should read about that too.

Hope that helps,
Philip





view thread (3+ messages)  latest in thread

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Disk is filling up with large files. How can I clean?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox