pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
template0 is having high age of datforzenxid
2+ messages / 2 participants
[nested] [flat]

* template0 is having high age of datforzenxid
@ 2019-04-02 22:35  AI Rumman <rummandba@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: AI Rumman @ 2019-04-02 22:35 UTC (permalink / raw)
  To: pgsql-general

Hi,

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?
Please advise.

Thanks.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: template0 is having high age of datforzenxid
@ 2019-04-03 00:20  Andres Freund <andres@anarazel.de>
  parent: AI Rumman <rummandba@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2019-04-03 00:20 UTC (permalink / raw)
  To: AI Rumman <rummandba@gmail.com>; +Cc: pgsql-general

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-04-03 00:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 22:35 template0 is having high age of datforzenxid AI Rumman <rummandba@gmail.com>
2019-04-03 00:20 ` Andres Freund <andres@anarazel.de>

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