On Fri, Mar 19, 2021 at 10:28 PM Konstantin Knizhnik <k.knizh...@postgrespro.ru> wrote: > > > > On 19.03.2021 12:17, Yugo NAGATA wrote: > > On Wed, 10 Mar 2021 03:00:25 +0100 > > Tomas Vondra <tomas.von...@enterprisedb.com> wrote: > > > >> What is being proposed here - an extension suggesting which statistics > >> to create (and possibly creating them automatically) is certainly > >> useful, but I'm not sure I'd call it "adaptive query optimization". I > >> think "adaptive" means the extension directly modifies the estimates > >> based on past executions. So I propose calling it maybe "statistics > >> advisor" or something like that. > > I am also agree with the idea to implement this feature as a new > > extension for statistics advisor. > > > >> BTW Why is "qual" in > >> > >> static void > >> AddMultiColumnStatisticsForQual(void* qual, ExplainState *es) > >> > >> declared as "void *"? Shouldn't that be "List *"? > > When I tested this extension using TPC-H queries, it raised segmentation > > fault in this function. I think the cause would be around this argument. > > > > Regards, > > Yugo Nagata > > > Attached please find new version of the patch with > AddMultiColumnStatisticsForQual parameter type fix and one more fix > related with handling synthetic attributes. > I can not reproduce the crash on TPC-H queries, so if the problem > persists, can you please send me stack trace and may be some other > information helping to understand the reason of SIGSEGV? >
"C:\projects\postgresql\pgsql.sln" (default target) (1) -> "C:\projects\postgresql\auto_explain.vcxproj" (default target) (45) -> (ClCompile target) -> contrib/auto_explain/auto_explain.c(658): error C2039: 'mt_plans' : is not a member of 'ModifyTableState' [C:\projects\postgresql\auto_explain.vcxproj] contrib/auto_explain/auto_explain.c(659): error C2039: 'mt_nplans' : is not a member of 'ModifyTableState' [C:\projects\postgresql\auto_explain.vcxproj] contrib/auto_explain/auto_explain.c(660): error C2198: 'AddMultiColumnStatisticsForMemberNodes' : too few arguments for call [C:\projects\postgresql\auto_explain.vcxproj] 2 Warning(s) 3 Error(s) Also Yugo Nagata's comments need to be addressed, I'm changing the status to "Waiting for Author". Regards, Vignesh