rjuju / pg_shared_plans

Shared cache plans for PostgreSQL
Other
14 stars 2 forks source link

I encountered the following problems when compiling the plug-in. Can you help me solve them? #1

Closed NEUguomiaomiao closed 3 years ago

NEUguomiaomiao commented 3 years ago

pg_shared_plans.c: In function ‘pgsp_query_walker’: pg_shared_plans.c:1704:58: error: ‘Query’ {aka ‘struct Query’} has no member named ‘groupDistinct’ 1704 | context->constid = hash_combine(context->constid, query->groupDistinct);

rjuju commented 3 years ago

Hi,

Thanks for your interest in this project! Just as a reminder this is still a work in progress, so the code as-is isn't safe yet. There are some known issue for which I plan to implement fixes shortly (xml expression aren't correctly hashed for instance, entry eviction are leaking dynamic shared memory, entry validity isn't checked after acquiring the locks....), and probably other issues that I'm not yet aware of, for which more thorough testing will have to be done.

For now I pushed https://github.com/rjuju/pg_shared_plans/commit/a33436ad0bcaae24f89c0553b0bedf36b78a4c40 which should allow you to compile the extension as-is on pg12+. Keep in mind that the regression tests would still be failing as some tests only works on pg13 or pg14, I'll fix that later as it will require more invasive work.

NEUguomiaomiao commented 3 years ago

Thank you very much for your reply. I wish your project better and better!

rjuju commented 3 years ago

Thanks a lot!

rjuju commented 3 years ago

For the record I fixed all the issues I was aware of. It's still a prototype but should be more much stable and reliable now.