Re: Why are data files getting modified? - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Why are data files getting modified?
Date
Msg-id 421e2826a8048d9601a95c3c415866c0abea878f.camel@cybertec.at
Whole thread Raw
In response to Re: Why are data files getting modified?  (Abhishek Bhola <abhishek.bhola@japannext.co.jp>)
List pgsql-general
On Thu, 2022-02-10 at 00:29 +0900, Abhishek Bhola wrote:
> > > I see there is an AUTOVACUUM job started on all the partitions that have been
> > > read (on which select has run). I am assuming the reason why Postgres is
> > > autovacuuming these large partitions is this:
> > > 
> > > db=# SELECT c.relname as table_name, c.relkind as type, age(c.relfrozenxid) as age,
> > > c.relfrozenxid FROM pg_class AS c WHERE age(c.relfrozenxid) <> 2147483647 ORDER BY 3 DESC LIMIT 20;
> > >         table_name         | type |    age    | relfrozenxid
> > > ---------------------------+------+-----------+--------------
> > >  hist_omx_orderaudit201506 | r    | 201463508 |       319891
> > >  hist_omx_orderaudit201509 | r    | 201418497 |       364902
> > >  hist_omx_orderaudit201205 | r    | 201142042 |       641357
> > > 
> > > autovacuum_freeze_max_age
> > > ---------------------------
> > >  200000000
> > > (1 row)
>
> I see, but then why is the autovacuum getting triggered after the select command?

Autovacuum is triggered because "relfrozenxid" is nore than 200000000 transactions
in the past.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-general by date:

Previous
From: Abhishek Bhola
Date:
Subject: Re: Why are data files getting modified?
Next
From: Ludwig Isaac Lim
Date:
Subject: Network Card Not Listening at Startup