Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-04-04T14:24:33Z
Lists: pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes: > On 2016/04/04 15:17, Rajkumar Raghuwanshi wrote: >> * .Observation: *Prepare statement execution plan is not getting changed >> even after altering foreign table to point to new schema. > I wonder if performing relcache invalidation upon ATExecGenericOptions() > is the correct solution for this problem. The attached patch fixes the > issue for me. A forced relcache inval will certainly fix it, but I'm not sure if that's the best (or only) place to put it. A related issue, now that I've seen this example, is that altering FDW-level or server-level options won't cause a replan either. I'm not sure there's any very good fix for that. Surely we don't want to try to identify all tables belonging to the FDW or server and issue relcache invals on all of them. regards, tom lane
Commits
-
Invalidate cached plans on FDW option changes.
- e4380e4cf68a 9.4.11 landed
- c52d37c8b367 10.0 landed
- aaf12e577ee9 9.5.6 landed
- a8191800a6e6 9.3.16 landed
- 4103a2f200d6 9.6.2 landed