Re: size of attributes table is too big

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Siraj G <tosiraj(dot)g(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: size of attributes table is too big
Date: 2025-03-19 17:16:57
Message-ID: CAFj8pRDhfOs5mDQNL7D7Z+CxX6ceXppQFLCOYPQKmLqH3BHotg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

st 19. 3. 2025 v 18:14 odesílatel Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
napsal:

> Hello
>
> On 2025-Mar-19, Siraj G wrote:
>
> > I have a PG (v16) instance which is occupying around 1TB of storage. Out
> of
> > this, around 350GB is occupied by the table pg_catalog.pg_attribute.
> > Why is the catalog table's size so big?
>
> Heavy use of temp tables is a known cause of this.
>
> > I think this table must have tons of dead tuples. Please suggest to me if
> > we can purge any data/shrink the size of this table.
>
> Yeah, I'd also bet that there are tons of dead tuples, or just unused
> free space. To purge it you would use VACUUM FULL, though that would
> need to lock all accesses to the table.
>
> Does your instance run with autovacuum disabled perchance?
>

or long unclosed transactions, maybe forgotten replication slots, ...

It is very strange so with this size it is still usable. Today hardware is
unbelievable strong

Regards

Pavel

>
> --
> Álvaro Herrera PostgreSQL Developer —
> https://www.EnterpriseDB.com/
> Bob [Floyd] used to say that he was planning to get a Ph.D. by the "green
> stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd'.
> After collecting 500 such letters, he mused, a university somewhere in
> Arizona would probably grant him a degree. (Don Knuth)
>
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-03-19 17:17:10 Re: size of attributes table is too big
Previous Message Álvaro Herrera 2025-03-19 17:13:44 Re: size of attributes table is too big