Thanks Thomas for the response,
It means if I run VACUUM ANALYZE on pg_attribute
or pg_class table, it is completely safe? Can you please also please confirm what is meant by "mid-level" vacuum?
Regards,
Inzamam Shafiq
Sr. DBA
From: Thomas Boussekey <thomas.boussekey@xxxxxxxxx>
Sent: Sunday, December 18, 2022 4:01 PM To: Inzamam Shafiq <inzamam.shafiq@xxxxxxxxxxx> Cc: pgsql-general@xxxxxxxxxxxxxxxxxxxx <pgsql-general@xxxxxxxxxxxxxxxxxxxx> Subject: Re: Autovacuum on sys tables
Hello Inzamam,
Le sam. 17 déc. 2022 à 08:16, Inzamam Shafiq <inzamam.shafiq@xxxxxxxxxxx> a écrit :
pg_repack cannot run on system tables, it will FAIL with an explicit error message explaining the limitation.
Each time you perform DDL operations (CREATE, DROP, ALTER), rows are inserted/updated or deleted into the system tables : pg_class, pg_attribute ...
Autovacuum operations perform "low-level" operations, it can be interesting to perform "middle-level" vacuum with VACUUM ANALYZE... that is not blocking, but will be more a resource-consuming operation than autovacuum.
Performing VACUUM FULL operation will block access to these pillar tables of your database.
If your application/users can handle it, go ahead!
At work on this kind of operation, I set a statement_timeout, in order to properly stop the process if it is over a defined amount of time.
Hope this helps,
Thomas
|