Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-11-02 Thread Justin Pryzby
On Tue, Nov 01, 2022 at 02:35:43PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > I added a CF entry and marked RFC. > > This should be included in v15.1. > > Right, done. Thanks. Yesterday, I realized that the bug was exposed here after we accidentally recreated a table as relkind=r rather

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-11-01 Thread Tom Lane
Justin Pryzby writes: > I added a CF entry and marked RFC. > This should be included in v15.1. Right, done. regards, tom lane

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-11-01 Thread Justin Pryzby
On Tue, Nov 01, 2022 at 05:33:24PM +0800, Richard Guo wrote: > On Mon, Oct 31, 2022 at 1:33 PM Michael Paquier 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 RangeTblEn

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-11-01 Thread Richard Guo
On Mon, Oct 31, 2022 at 1:33 PM Michael Paquier 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 extend

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-10-30 Thread Michael Paquier
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 st

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-10-30 Thread Richard Guo
On Mon, Oct 31, 2022 at 12:26 PM Richard Guo wrote: > On Mon, Oct 31, 2022 at 1:05 AM Justin Pryzby > wrote: > >> I think this is what's needed. >> >> diff --git a/src/backend/utils/adt/selfuncs.c >> b/src/backend/utils/adt/selfuncs.c >> index 14e0885f19f..4450f0d682f 100644 >> --- a/src/backend

Re: pg15 inherited stats expressions: cache lookup failed for statistics object

2022-10-30 Thread Richard Guo
On Mon, Oct 31, 2022 at 1:05 AM Justin Pryzby wrote: > I think this is what's needed. > > diff --git a/src/backend/utils/adt/selfuncs.c > b/src/backend/utils/adt/selfuncs.c > index 14e0885f19f..4450f0d682f 100644 > --- a/src/backend/utils/adt/selfuncs.c > +++ b/src/backend/utils/adt/selfuncs.c >