From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pg15 inherited stats expressions: cache lookup failed for statistics object |
Date: | 2022-11-01 13:12:40 |
Message-ID: | 20221101131240.GW16921@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 01, 2022 at 05:33:24PM +0800, Richard Guo wrote:
> On Mon, Oct 31, 2022 at 1:33 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> > On Mon, Oct 31, 2022 at 01:12:09PM +0800, Richard Guo wrote:
> > > BTW, I noticed a micro-optimization opportunity in examine_variable that
> > > we can fetch the RangeTblEntry for 'onerel' outside the foreach loop
> > > when iterating the extended stats so that we can do it only once rather
> > > than for each stat.
> >
> > Isn't that the kind of thing where we'd better have some regression
> > coverage?
>
> Yeah, we need to have some regression tests for that. I come up with a
> case in stats_ext like below
Well done
> This case should be able to cover both expression stats and ndistinct
> stats. Hence, attach v2 patch.
Thanks for finishing it up.
I added a CF entry and marked RFC.
This should be included in v15.1.
--
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-11-01 13:15:46 | Re: real/float example for testlibpq3 |
Previous Message | Justin Pryzby | 2022-11-01 13:07:17 | Re: pg_upgrade allows itself to be run twice |