Re: Removing vacuum_cleanup_index_scale_factor
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-09T06:21:13Z
Lists: pgsql-hackers
On Tue, Mar 9, 2021 at 7:35 AM Peter Geoghegan <pg@bowt.ie> wrote: > > On Mon, Mar 8, 2021 at 1:38 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > As you say, the history here is a bit convoluted, but it seems like > > a good principle to avoid interconnections between VACUUM and ANALYZE > > as much as we can. I haven't been paying enough attention to this > > thread to have more insight than that. > > The attached patch does what I proposed earlier today: it teaches > do_analyze_rel() to always set pg_class.reltuples for indexes when it > would do the same thing for the heap/table relation already. It's now > uniform in that sense. Thank you for the patches. I looked at 0001 patch and have a comment: + * We don't report to the stats collector here because the stats collector + * only tracks per-table stats. Reset the changes_since_analyze counter + * only if we analyzed all columns; otherwise, there is still work for + * auto-analyze to do. I think the comment becomes clearer if we add "if doing inherited stats" at top of the above paragraph since we actually report to the stats collector in !inh case. > > Also included is a patch that removes the > vacuum_cleanup_index_scale_factor mechanism for triggering an index > scan during VACUUM -- that's what the second patch does (this depends > on the first patch, really). 0002 patch looks good to me. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/
Commits
-
VACUUM ANALYZE: Always update pg_class.reltuples.
- 5f8727f5a679 14.0 landed
- 1fc5a57386d1 13.3 landed
-
Don't consider newly inserted tuples in nbtree VACUUM.
- 9f3665fbfc34 14.0 landed
- 9663d124466f 13.3 landed
-
Fix nbtree cleanup-only VACUUM stats inaccuracies.
- 48e1291342dd 14.0 cited
-
Disable recheck_on_update optimization to avoid crashes.
- 5d28c9bd73e2 12.0 cited
-
Fix VACUUM so that it always updates pg_class.reltuples/relpages.
- b4b6923e03f4 9.1.0 cited
-
Clean up API for ambulkdelete/amvacuumcleanup as per today's discussion.
- e57345975cf8 8.2.0 cited
-
First steps towards statistics on expressional (nee functional) indexes.
- f0c9397f8085 8.0.0 cited