| From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
|---|---|
| To: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
| Cc: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: extended stats on partitioned tables |
| Date: | 2021-12-03 05:24:11 |
| Message-ID: | 20211203052411.GU17618@telsasoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 04, 2021 at 12:44:45AM +0100, Tomas Vondra wrote:
> >> And I'm not sure we do the right thing after removing children, for example
> >> (that should drop the inheritance stats, I guess).
> > Do you mean for inheritance only ? Or partitions too ?
> > I think for partitions, the stats should stay.
> > And for inheritence, they can stay, for consistency with partitions, and since
> > it does no harm.
>
> I think the behavior should be the same as for data in pg_statistic,
> i.e. if we keep/remove those, we should do the same thing for extended
> statistics.
That works for column stats the way I proposed for extended stats: child stats
are never removed, neither when the only child is dropped, nor when re-running
analyze (that part is actually a bit odd).
Rebased, fixing an intermediate compile error, and typos in the commit message.
--
Justin
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Do-not-use-extended-statistics-on-inheritance-trees.patch | text/x-diff | 6.3 KB |
| 0002-Build-inherited-extended-stats-on-partitioned-tables.patch | text/x-diff | 6.6 KB |
| 0003-Add-stxdinherit-build-inherited-extended-stats-on-in.patch | text/x-diff | 29.1 KB |
| 0004-f-check-inh.patch | text/x-diff | 6.4 KB |
| 0005-Maybe-better-than-looping-twice.-For-partitioned-tab.patch | text/x-diff | 12.3 KB |
| 0006-Refactor-parent-ACL-check.patch | text/x-diff | 6.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2021-12-03 05:30:49 | Re: Alter all tables in schema owner fix |
| Previous Message | vignesh C | 2021-12-03 04:44:33 | Re: Alter all tables in schema owner fix |