Re: Nonrandom scanned_pages distorts pg_class.reltuples set by VACUUM - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Nonrandom scanned_pages distorts pg_class.reltuples set by VACUUM
Date
Msg-id 20220217030843.lobpksmgpqiifp2c@alap3.anarazel.de
Whole thread Raw
In response to Re: Nonrandom scanned_pages distorts pg_class.reltuples set by VACUUM  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Nonrandom scanned_pages distorts pg_class.reltuples set by VACUUM  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Hi,

On 2022-02-16 17:16:13 -0800, Peter Geoghegan wrote:
> On Sun, Feb 13, 2022 at 1:43 PM Peter Geoghegan <pg@bowt.ie> wrote:
> > This fixes the observed problem directly. It also makes the code
> > robust against other similar problems that might arise in the future.
> > The risk that comes from trusting that scanned_pages is a truly random
> > sample (given these conditions) is generally very large, while the
> > risk that comes from disbelieving it (given these same conditions) is
> > vanishingly small.
>
> Pushed.

I'm quite worried about the pace and style of the vacuum changes. To me it
doesn't look like that there was design consensus before 44fa8488 was
committed, quite the opposite (while 44fa8488 probably isn't the center of
contention, it's not just off to the side either).

You didn't really give a heads up that you're about to commit either. There's
a note at the bottom of [1], a very long email, talking about committing in a
couple of weeks. After which there was substantial discussion of the patchset.

It doesn't look to me like there was a lot of review for 44fa8488, despite it
touching very critical parts of the code. I'm listed as a reviewer, that was a
few months ago, and rereading my review I don't think it can be read to agree
with the state of the code back then.

I also have a hard time making heads or tails out of the commit message of
44fa84881ff. It's quite long without being particularly descriptive. The
commit just changes a lot of things at once, making it hard to precisely
describe and very hard to review and understand.


Then you just committed 74388a1ac36, three days after raising it. Without any
sort of heads up. You talked about a "draft patch".


It'd be one thing if this was happening in isolation or that nobody complained
about this before. But see among others [2], [3], [4], [5]


And yes, it'd have been nice for 44fa8488' thread to have attracted more
reviews. But as far as complicated patchsets go, it has actually gotten more
attention than most of a similar vintage. Engaging with you around vacuum is
time and energy intensive, there tend to be lots of very long
emails. Reviewers have their own work as well.


I'm miffed.

- Andres

[1] https://www.postgresql.org/message-id/CAH2-Wz%3DiLnf%2B0CsaB37efXCGMRJO1DyJw5HMzm7tp1AxG1NR2g%40mail.gmail.com
[2] https://www.postgresql.org/message-id/20210414193310.4yk7wriswhqhcxvq%40alap3.anarazel.de
[3] https://www.postgresql.org/message-id/CA%2BTgmobyUxq2Ms3g5YMPgqJzNOi7BmStcFGwCNd-W7z8nxbjUA%40mail.gmail.com
[4] https://www.postgresql.org/message-id/CA+TgmoYdp4qy2LFW7yCi6yFJ1m-RCH+npctJQd29k6d6uCx0ww@mail.gmail.com
[5] https://www.postgresql.org/message-id/CA+TgmobkCExv7Zo+pArRCsJ16hYVJJB_VuZKwvk1cCP=rS1Qbw@mail.gmail.com



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: do only critical work during single-user vacuum?
Next
From: Tom Lane
Date:
Subject: Re: Race conditions in 019_replslot_limit.pl