Re: Should a DB vacuum use up a lot of space ?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Philippe Girolami <philippe(dot)girolami(at)mosaik(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Should a DB vacuum use up a lot of space ?
Date: 2016-08-07 15:20:09
Message-ID: ea7c5259-3e57-229e-9448-533fac286e45@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 08/07/2016 12:32 AM, Philippe Girolami wrote:
> @Adrian, no problem ! I’m sure someone else will run into this and have the same questions, hopefully they’ll find the answers.
>
> I am seeing something weird though (again, this is v9.1): after my database became usable again, I started getting the 10M warning on template0. So I made it connectable and ran VACUUM FREEZE on it and made it unconnectable again. That resolve the warning.
>
> However, I see the “age” keeps increasing on that database as I ran queries on my own db. Yesterday the age was 32 and now it’s already 77933902

Just to be sure you are talking about template0?

> Is that to be expected ? I didn’t expect it

As I understand it;

1) xid's are global to the cluster.
2) age(xid) measures the difference between the latest global xid to
whatever xid you supply it.
3) age(datfrozenxid) measures the difference between the minimum value
for the table frozen ids in a particular database and the latest global xid.
4) template0 has a datfrozenxid so there is something for age(xid) to
compute, it just does not mean anything as long as template0 is really a
read-only database. In other words template0 is not actually
contributing any transactions to the consumption of the global store of
xids.

>
> Thanks
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-08-07 15:43:18 Re: how to serialize insert followed by read(select) by different clients
Previous Message Victor Yegorov 2016-08-07 14:32:20 Re: [GENERAL] ФС против Постгреса для файлов