Re: extended stats on partitioned tables
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Zhihong Yu <zyu@yugabyte.com>,
Jaime Casanova <jcasanov@systemguards.com.ec>, pgsql-hackers@postgresql.org
Date: 2022-01-15T18:35:12Z
Lists: pgsql-hackers
Attachments
- 0001-Add-stxdinherit-flag-to-pg_statistic_ext_da-20220115.patch (text/x-patch) patch 0001
- 0002-Refactor-parent-ACL-check-20220115.patch (text/x-patch) patch 0002
On 1/15/22 06:11, Justin Pryzby wrote: > On Mon, Dec 13, 2021 at 09:40:09PM +0100, Tomas Vondra wrote: >> 1) If the table is a separate relation (not part of an inheritance >> tree), this should make no difference. -> OK >> >> 2) If the table is using "old" inheritance, this reverts back to >> pre-regression behavior. So people will keep using the old statistics >> until the ANALYZE, and we need to tell them to ANALYZE or something. >> >> 3) If the table is using partitioning, it's guaranteed to be empty and >> there are no stats at all. Again, we should tell people to run ANALYZE. > > I think these can be mentioned in the commit message, which can end up in the > minor release notes as a recommendation to rerun ANALYZE. > Good point. I pushed the 0002 part and added a short paragraph suggesting ANALYZE might be necessary. I did not go into details about the individual cases, because that'd be too much for a commit message. > Thanks for pushing 0001. > Thanks for posting the patches! I've pushed the second part - attached are the two remaining parts. I'll wait a bit before pushing the rebased 0001 (which goes into master branch only). Not sure about 0002 - I'm not convinced the refactored ACL checks are an improvement, but I'll think about it. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add stxdinherit flag to pg_statistic_ext_data
- 269b532aef55 15.0 landed
-
Build inherited extended stats on partitioned tables
- d6817032d26b 13.6 landed
- 20b9fa308ebf 15.0 landed
- ea212bd95fd2 14.2 landed
- 9d1bcf5dc11a 12.10 landed
- 491182e52909 11.15 landed
- 9211c2e38f09 10.20 landed
-
Ignore extended statistics for inheritance trees
- 76569ad6f423 12.10 landed
- ff0e7c7e8401 10.20 landed
- b3cac25f4d50 11.15 landed
- acfde7c5837d 13.6 landed
- 2cc007fd0359 14.2 landed
- 36c4bc6e725f 15.0 landed
-
Don't build extended statistics on inheritance trees
- 859b3003de87 10.10 cited
-
Tighten up relation kind checks for extended statistics
- 8c5cdb7f4f6e 10.0 cited
-
Avoid assuming that statistics for a parent relation reflect the properties of
- 427c6b5b9849 8.2.0 cited