Re: Disk is filling up with large files. How can I clean?

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Disk is filling up with large files. How can I clean?
Date: 2024-10-09 14:29:09
Message-ID: CANzqJaB3D=P6y=zosX3ZyB3dELAT=hm4uzWGZRF3+g+_O6m2xg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 9, 2024 at 9:02 AM Philip Semanchuk <
philip(at)americanefficient(dot)com> wrote:

>
> > On Oct 9, 2024, at 5:52 AM, Torsten Förtsch <tfoertsch123(at)gmail(dot)com>
> 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.
>

VACUUM FULL with an almost-full disk probably isn't the wisest idea.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> crustacean!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-10-09 14:51:16 Re: Questions about document "Concurrenry control" section
Previous Message Ron Johnson 2024-10-09 14:25:16 Re: pg_dump throwing segfault error during backup