From: Andres Freund <andres@anarazel.de>
To: AI Rumman <rummandba@gmail.com>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: template0 is having high age of datforzenxid
Date: Tue, 2 Apr 2019 17:20:36 -0700
Message-ID: <20190403002036.vrtno5dct635tbcn@alap3.anarazel.de> (raw)
In-Reply-To: <CAGoODpfKeo-kPr3M5hFbkYJu29dz_nx-rXkDyBKod7E_XVMZQA@mail.gmail.com>
References: <CAGoODpfKeo-kPr3M5hFbkYJu29dz_nx-rXkDyBKod7E_XVMZQA@mail.gmail.com>
Hi,
On 2019-04-02 15:35:53 -0700, AI Rumman wrote:
> I am running Postgresql 10 where I can see the template0 database is having
> longest datfrozenxid:
> ```db_name age_of_datfrozenxid
> --------------------------------------
> postgres 251365
> template1 234574
> template0 75366462
> db1 253097
> db2 250649
> db3 250649
> db4 14641
> db5 14214```
>
> Initially I had high age for all the databases and I ran "vacuum freeze"
> which brought down the age of other databases. But how can I do the same
> for template0?
75 million isn't that high - autovacuum will automatically look at it
once above autovacuum_max_freeze_age (defaulting to 200 million). If
you really for some reason need to make it have a lower datfrozenxid
(why?), you'd need to update its pg_database entry to allow connections,
connect to it, vacuum it, and change datallowconn back.
Greetings,
Andres Freund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andres@anarazel.de, rummandba@gmail.com
Subject: Re: template0 is having high age of datforzenxid
In-Reply-To: <20190403002036.vrtno5dct635tbcn@alap3.anarazel.de>
References: <CAGoODpfKeo-kPr3M5hFbkYJu29dz_nx-rXkDyBKod7E_XVMZQA@mail.gmail.com> <20190403002036.vrtno5dct635tbcn@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox