Re: Vacuuming System DBs like postgres, template1 - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Vacuuming System DBs like postgres, template1
Date
Msg-id CAKFQuwafDdAKdYTWq_aC_=yXgUydCA__Aiim16C=ZT7Cr+M-vg@mail.gmail.com
Whole thread Raw
In response to Vacuuming System DBs like postgres, template1  (OMPRAKASH SAHU <sahuop2121@gmail.com>)
Responses Re: Vacuuming System DBs like postgres, template1
List pgsql-admin
On Sun, Aug 3, 2025 at 8:45 PM OMPRAKASH SAHU <sahuop2121@gmail.com> wrote:
On few large DBs we run vacuum analyze manually as well, and I do see few people vacuuming the template1 db or postgres db also 

So just wanted to know vacuum system dbs is required or not?

Pretty sure the answer is yes - though letting auto-vacuum do it is sufficient - since something has to update the catalog column that indicates the oldest transaction the database is aware of.  There isn't a value for that which means "everything has been frozen" since it doesn't get updated in the normal course of activity.

David J.

pgsql-admin by date:

Previous
From: OMPRAKASH SAHU
Date:
Subject: Vacuuming System DBs like postgres, template1
Next
From: Mahesh Shetty
Date:
Subject: Indexing Strategy for Partitioned Table in PostgreSQL 15.13