Re: size of attributes table is too big

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

Hello Pavel

The SQL instance is a target of google DMS and it does have a physical
replica.

A couple of weeks back we did have a performance issue and vacuum was run
at that time to fix the problem. Very soon we may run into the same problem
I presume.

Regards
Siraj

On Wed, Mar 19, 2025 at 10:47 PM Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:

>
>
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Siraj G 2025-03-19 17:36:49 Re: size of attributes table is too big
Previous Message Tom Lane 2025-03-19 17:22:47 Re: After upgrading libpq, the same function(PQftype) call returns a different OID