Re: PROC_IN_ANALYZE stillborn 13 years ago
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
James Coleman <jtc331@gmail.com>,
pgsql-hackers <pgsql-hackers@lists.postgresql.org>,
Simon Riggs <simon@2ndquadrant.com>
Date: 2020-08-06T22:02:26Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > In fact using conceptually like a new snapshot for each sample tuple > actually seems like it'd be somewhat of an improvement over using a > single snapshot. Dunno, that feels like a fairly bad idea to me. It seems like it would overemphasize the behavior of whatever queries happened to be running concurrently with the ANALYZE. I do follow the argument that using a single snapshot for the whole ANALYZE overemphasizes a single instant in time, but I don't think that leads to the conclusion that we shouldn't use a snapshot at all. Another angle that would be worth considering, aside from the issue of whether the sample used for pg_statistic becomes more or less representative, is what impact all this would have on the tuple count estimates that go to the stats collector and pg_class.reltuples. Right now, we don't have a great story at all on how the stats collector's count is affected by combining VACUUM/ANALYZE table-wide counts with the incremental deltas reported by transactions happening concurrently with VACUUM/ANALYZE. Would changing this behavior make that better, or worse, or about the same? regards, tom lane
Commits
-
Call out vacuum considerations in create index docs
- c285a244f6d3 13.2 landed
- 93c39f987e9c 14.0 landed
- 259b21233032 12.6 landed
-
Document concurrent indexes waiting on each other
- ed9c9b033546 11.11 landed
- d3bd36a63d69 10.16 landed
- b3d33bf598dd 9.6.21 landed
- b2603f16ad75 12.6 landed
- 968a537b432e 9.5.25 landed
- 58ebe967f8a1 14.0 landed
- 3fe0e7c3fa27 13.2 landed
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited
-
Remove PROC_IN_ANALYZE and derived flags
- cea3d5589865 14.0 landed
-
Improve performance of get_actual_variable_range with recently-dead tuples.
- 3ca930fc39cc 11.0 cited