public inbox for [email protected]
help / color / mirror / Atom feedFrom: Robert Treat <[email protected]>
To: Nathan Bossart <[email protected]>
Cc: Sami Imseih <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: [email protected]
Cc: pgsql-hackers <[email protected]>
Subject: Re: remove autoanalyze corner case
Date: Sat, 4 Apr 2026 07:53:21 -0400
Message-ID: <CAJSLCQ3JqDfHju2FcaMb0G3Q1m+-G5Sg_6r071CMkNZm5hOdGw@mail.gmail.com> (raw)
In-Reply-To: <adB9nSsm_S0D9708@nathan>
References: <adB9nSsm_S0D9708@nathan>
On Fri, Apr 3, 2026 at 10:55 PM Nathan Bossart <[email protected]> wrote:
>
> (new thread from [0])
>
> On Fri, Apr 03, 2026 at 02:13:16PM -0500, Sami Imseih wrote:
> >> * I noticed that if autovacuum decides to force a vacuum for
> >> anti-wraparound purposes, it might also decide to analyze the table even if
> >> autovacuum is disabled for it. AFAICT this is accidental, but since it's
> >> behaved this way since commit 48188e1621 (2006) [0], I am slightly worried
> >> that this bug may have become a feature. In 0002, I separated this edge
> >> case in the code and added a comment, and I intend to start a new thread
> >> about removing it.
> >
> > hmm yeah, I think this just needs to be documented clearly. I always
> > thought it was expected for auto-analyze to run in this case, and I don't
> > see why it shouldn't. If this needs to be clarified in docs, we should
> > do that in a separate discussion.
>
> Well, autoanalyze only runs in this case if autovacuum is disabled via the
> table's autovacuum_enabled reloption and _not_ disabled via the autovacuum
> or track_counts GUCs. I think this is pretty clearly unintentional, as I
> can find no mention in the code, archives, or docs. And unless I'm missing
> something, it's completely unnecessary. So IMHO we should just remove it.
>
> [0] https://postgr.es/m/CAA5RZ0sCRjH3xkHFdSXnKysdMZXFyaS_094%2BK-O_rr4Fkmwc%3DQ%40mail.gmail.com
>
AFAICS, near misses on wraparound in and of itself have no correlation
with statistical changes in your data, so I'd agree it isn't
necessary, and the fact that it behaves differently in this more
narrow case than it would in the more general case, when these two
cases are (as far as I've ever known) supposed to behave the same way,
I'd be +1 to remove this.
Robert Treat
https://xzilla.net
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: remove autoanalyze corner case
In-Reply-To: <CAJSLCQ3JqDfHju2FcaMb0G3Q1m+-G5Sg_6r071CMkNZm5hOdGw@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox