From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Perumal Raj <perucinci@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Autovacuum Transaction Wraparound
Date: Mon, 11 Mar 2019 12:44:58 -0700
Message-ID: <d4538d4c-9c76-66b8-c033-641492ce36d0@aklaver.com> (raw)
In-Reply-To: <CALvqh4p1QU52G8uSa_3bpgzKMvz3qBPKVo_o3D=HYjeFBGvCSg@mail.gmail.com>
References: <CALvqh4pfm2yOuOJPO3hJ+42MyEMX2kEBYNk17uF4s=dVj=KB1A@mail.gmail.com>
<1c659890-cbf7-8c6d-266c-7521ab674bbf@aklaver.com>
<CALvqh4p1QU52G8uSa_3bpgzKMvz3qBPKVo_o3D=HYjeFBGvCSg@mail.gmail.com>
On 3/11/19 12:16 PM, Perumal Raj wrote:
> Hi Adrian/Joshua
>
> Sorry to mention in the previous thread,
>
> Auto-vacuum is already enabled in the Cluster and its doing the job
> perfectly. But only thing manual vacuum scheduled now (weekly Cluster
> wide) after noticing 'Transaction Wraparound message during Autovacuum run.
What was the full message?
>
> Version : 9.2.24
FYI 9.2 is 1 years+ past EOL.
>
> Query :
>
> SELECT datname, age(datfrozenxid) FROM pg_database
> datname | age
> ------------------+-----------
> template1 | 133492380
> template0 | 180987489
> postgres | 93330701
> nagio | 109936658
> arch__old | 109936658
> prod . | 151621905
So at some point the server will force a VACUUM to freeze ids and
prevent wraparound before the age gets to your autovacuum_freeze_max_age
below. That might even have been the message you saw.
>
> Settings :
>
> name | setting | unit
> ---------------------------------+-----------+------
> autovacuum | on |
> autovacuum_analyze_scale_factor | 0.05 |
> autovacuum_analyze_threshold | 50 |
> autovacuum_freeze_max_age | 200000000 |
> autovacuum_max_workers | 3 |
> autovacuum_naptime | 60 | s
> autovacuum_vacuum_cost_delay | 20 | ms
> autovacuum_vacuum_cost_limit | -1 |
> autovacuum_vacuum_scale_factor | 0.2 |
> autovacuum_vacuum_threshold | 50 |
>
> log_autovacuum_min_duration |-1 . |
>
> Regards,
>
>
> On Mon, Mar 11, 2019 at 12:07 PM Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 3/11/19 11:51 AM, Perumal Raj wrote:
> > Hi Experts
> >
> > I have noticed in my Database that, there is no regular Vacuum
> > maintenance happening
>
> What Postgres version?
>
> > So i started Weekly Job across cluster. But still i am seeing
> gradual
> > growth on transacation ID.
>
> What query are you using?
>
> >
> > DB is still using default autovacuum_freeze_min_age &
> > autovacuum_freeze_table_age.
>
> What are the actual settings for?:
>
> https://www.postgresql.org/docs/10/runtime-config-autovacuum.html
>
> >
> > Question : Since i am running regularly vacuum job ( weekly) and the
> > Transaction age is gradually growing , What is next once i hit 200M
> > limit ( default ).
> > Should i increase my default value ? If so any calculation for
> increase
> > the value based on my DB transaction growth.
> >
> > Thanks,
> > Raj
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, perucinci@gmail.com
Subject: Re: Autovacuum Transaction Wraparound
In-Reply-To: <d4538d4c-9c76-66b8-c033-641492ce36d0@aklaver.com>
References: <CALvqh4pfm2yOuOJPO3hJ+42MyEMX2kEBYNk17uF4s=dVj=KB1A@mail.gmail.com> <1c659890-cbf7-8c6d-266c-7521ab674bbf@aklaver.com> <CALvqh4p1QU52G8uSa_3bpgzKMvz3qBPKVo_o3D=HYjeFBGvCSg@mail.gmail.com> <d4538d4c-9c76-66b8-c033-641492ce36d0@aklaver.com>
* 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