Re: Clarification Regarding Vacuum and template1 - Mailing list pgsql-general

From Tom Lane
Subject Re: Clarification Regarding Vacuum and template1
Date
Msg-id 6991.1139325236@sss.pgh.pa.us
Whole thread Raw
In response to Clarification Regarding Vacuum and template1  (Ludwig Isaac Lim <ludz_lim@yahoo.com>)
Responses Re: Clarification Regarding Vacuum and template1  (Ludwig Isaac Lim <ludz_lim@yahoo.com>)
List pgsql-general
Ludwig Isaac Lim <ludz_lim@yahoo.com> writes:
>   Under normal circumstances, there's no need to vacuum
> template1 right?

Only if it hasn't been modified.

> Its quite difficult to imagine XID
> wraparound problems occuring in template1. I can't think
> how can 4 billion transactions occur in template1 if
> template1 is just used as a template in creating a new
> database.

>   Am I missing something here?

Yes: the wraparound limit is for transactions cluster-wide, not per
database.  If you make 1 change in template1 and then 2 billion
changes in some other databases, template1 is broken unless it's
been vacuumed meanwhile.

            regards, tom lane

pgsql-general by date:

Previous
From: Nikolay Samokhvalov
Date:
Subject: Re: Sequences/defaults and pg_dump
Next
From: "Gevik Babakhani"
Date:
Subject: Re: Commercial Use