Re: vacuuming taking long time for pg_attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 17, 2025 at 1:15 AM Siraj G <tosiraj.g@xxxxxxxxx> wrote:
Hello Experts!

The PgSQL version is 16 and it runs in Cloud SQL managed by GCP.

Problem was that we were unable to conveniently get the object details in the schema browser (within the Cloud SQL Studio) as it was getting timeout again and again. Several application jobs start to fail. Eventually we found that pg_catalog.pg_attribute was having tons of dead tuples. While vacuum on this took several hours, the problem got resolved eventually.
Command ran: vacuum pg_attribute;

I would like to understand how this issue can be prevented. We do have autovacuum ON and I could see the last vacuum on this table was just about 30hrs back.

It might be hard to figure it out now that the evidence has likely been destroyed.  When looking at when the last autovac finished, did you also happen to capture the other column values in pg_stat_sys_tables for that relname?

Look in the db server log file to see if there were failed or canceled autovacuum attempts on that table.

I would probably set log_autovacuum_min_duration to a smallish value so that if it happens again you have some evidence to look at.

Cheers,

Jeff

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux