|From:||Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>|
|To:||Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>|
|Cc:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <amitlangote09(at)gmail(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 2016/09/29 20:03, Ashutosh Bapat wrote:
> On Tue, Apr 5, 2016 at 10:54 AM, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> How about the attached that teaches
>> extract_query_dependencies() to add a foreign table and associated foreign
>> data wrapper and foreign server to invalItems. Also, it adds plan cache
>> callbacks for respective caches.
> Although this is a better solution than the previous one, it
> invalidates the query tree along with the generic plan. Invalidating
> the query tree and the generic plan required parsing the query again
> and generating the plan. Instead I think, we should invalidate only
> the generic plan and not the query tree.
> The attached patch adds the
> dependencies from create_foreignscan_plan() which is called for any
> foreign access. I have also added testcases to test the functionality.
> Let me know your comments on the patch.
Hmm. I'm not sure that that's a good idea.
I was thinking the changes to setrefs.c proposed by Amit to collect that
dependencies would be probably OK, but I wasn't sure that it's a good
idea that he used PlanCacheFuncCallback as the syscache inval callback
function for the foreign object caches because it invalidates not only
generic plans but query trees, as you mentioned downthread. So, I was
thinking to modify his patch so that we add a new syscache inval
callback function for the caches that is much like PlanCacheFuncCallback
but only invalidates generic plans.
|Next Message||Kyotaro HORIGUCHI||2016-09-29 13:02:57||Re: WAL logging problem in 9.4.3?|
|Previous Message||Etsuro Fujita||2016-09-29 12:21:49||Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.|