Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, 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.
Date: 2017-01-03 06:57:19
Message-ID: CAFjFpRePh3DJ6Ongb2hrqWKRz5EnYwn8r3-vhXZCE3Q-ASuU2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 30, 2016 at 2:35 PM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> On 2016/11/30 17:53, Amit Langote wrote:
>>
>> On 2016/11/30 17:25, Etsuro Fujita wrote:
>>>
>>> Done. I modified the patch so that any inval in pg_foreign_server also
>>> blows the whole plan cache.
>
>
>> I noticed the following addition:
>>
>> + CacheRegisterSyscacheCallback(FOREIGNDATAWRAPPEROID,
>> PlanCacheSysCallback, (Datum) 0);
>>
>> Is that intentional? I thought you meant only to add for
>> pg_foreign_server.
>
>
> Yes, that's intentional; we would need that as well, because cached plans
> might reference FDW-level options, not only server/table-level options. I
> couldn't come up with regression tests for FDW-level options in
> postgres_fdw, though.

The patch looks good to me, but I feel there are too many testscases.
Now that we have changed the approach to invalidate caches in all
cases, should we just include cases for SELECT or UPDATE or INSERT or
DELETE instead of each statement?

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-01-03 07:38:37 Re: proposal: session server side variables
Previous Message Mithun Cy 2017-01-03 06:35:35 Re: Cache Hash Index meta page.