pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ninad Shah <ninad.shah@percona.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Mauro Farracha <farracha@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Automatic autovacuum to prevent wraparound - PG13.5
Date: Fri, 24 Jun 2022 22:26:44 +0530
Message-ID: <CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.com> (raw)
In-Reply-To: <9babf7514fb0d98d55042552def28adf9eab9824.camel@cybertec.at>
References: <CAAhWs6BDVPYJ3_cei-wLyFVToWiUza2kkkZD2pevxuGAn3-K2Q@mail.gmail.com>
	<9babf7514fb0d98d55042552def28adf9eab9824.camel@cybertec.at>

Frankly speaking, Aurora PostgreSQL's behaviour is quite unpredictable.
In our case, the autovacuum was not even getting triggered in spite of
crossing the autovacuum_freeze_max_age. Finally, the database went down
abruptly, which resolved the issue.


Thanks,
Ninad

On Wed, Jun 15, 2022 at 7:57 PM Laurenz Albe <laurenz.albe@cybertec.at>
wrote:

> On Wed, 2022-06-15 at 12:13 +0100, Mauro Farracha wrote:
> > Have recently upgraded from PG10 to PG13.5 and would like to understand
> the reason why we
> > are seeing triggered autovacuum to prevent the wraparound while all
> the metrics are still
> > far off from the multixact/freeze max ages defined. And inclusive there
> was one time where
> > it was triggered as aggressive.
> >
> > Some background:
> > - autovacuum_freeze_max_age: 400M
> > - autovacuum_multixact_freeze_max_age: 800M
> > - the activity is mostly insert intensive in one particular table (60M
> daily)
> > - the team execute vacuum freeze verbose every day at night to keep the
> multixact ids down
> > - we generally reach near 70M mxids before running vacuum freeze at night
> > - the postgresql is Aurora
> >
> > The scenario:
> > - Out of nowhere (during the weekend), without database activity load or
> batches running,
> >   with previous nightly run of vacuum freeze, in the middle of the day,
> with xids and mxids
> >   below 20M we are seeing autovacuum being triggered to prevent
> wraparound.
> >
> > My question is why this is occurring, which condition might be
> responsible for this behaviour?
>
> A long-running transaction or a prepared transaction.
> Or an abandoned replication slot with an old "xmin".
>
> That would be the answer for PostgreSQL.  It might apply to Amazon Aurora,
> unless they
> changed the behavior there.  Perhaps ask Amazon.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>
>

view thread (4+ messages)  latest in thread

Message-ID: <CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.com>
Permalink:  ../CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.com/
Also on:    postgresql.org/message-id/CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.com

 · 

reply

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: ninad.shah@percona.com, laurenz.albe@cybertec.at, farracha@gmail.com
  Subject: Re: Automatic autovacuum to prevent wraparound - PG13.5
  In-Reply-To: <CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.com>
  References: <CAAhWs6BDVPYJ3_cei-wLyFVToWiUza2kkkZD2pevxuGAn3-K2Q@mail.gmail.com> <9babf7514fb0d98d55042552def28adf9eab9824.camel@cybertec.at> <CAMtEjObGJd_EFsyVrL7Fe_fuUPc7H+4OXZ7X=O2OxFdUmEx6Ww@mail.gmail.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