Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Postgres Pro Shardman
Postgres Pro Enterprise Manager
Postgres Pro ProGate
Cloud Solutions
Postgres Extensions
Cases
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Postgres Pro Shardman
Postgres Pro Enterprise Manager
Postgres Pro ProGate
Cloud Solutions
Postgres Extensions
Cases
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Request a Demo
Home
>
mailing lists
postgres_fdw : altering foreign table not invalidating prepare statement execution plan. - Mailing list pgsql-hackers
From
Rajkumar Raghuwanshi
Subject
postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
Date
April 4, 2016
06:17:53
Msg-id
CAKcux6m5cA6rRPTKkqVdJ-R=KKDfe35Q_ZuUqxDSV_4hwga=og@mail.gmail.com
Whole thread
Responses
Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan.
List
pgsql-hackers
Tree view
Hi,
I observed below in postgres_fdw
.
Observation:
Prepare statement execution plan is not getting changed even after altering foreign table to point to new schema.
CREATE EXTENSION postgres_fdw;
CREATE SCHEMA s1;
create table
s1.lt
(c1 integer, c2 varchar);
insert into
s1.lt
values (1, '
s1.lt
');
CREATE SCHEMA s2;
create table
s2.lt
(c1 integer, c2 varchar);
insert into
s2.lt
values (1, '
s2.lt
');
CREATE SERVER link_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (dbname 'postgres', port '5447', use_remote_estimate 'true');
CREATE USER MAPPING FOR public SERVER link_server;
create foreign table ft (c1 integer, c2 varchar) server link_server options (schema_name 's1',table_name 'lt');
ANALYZE ft;
PREPARE stmt_ft AS select c1,c2 from ft;
EXECUTE stmt_ft;
c1 | c2
----+-------
1 |
s1.lt
(1 row)
--changed foreign table ft pointing schema from s1 to s2
ALTER foreign table ft options (SET schema_name 's2', SET table_name 'lt');
ANALYZE ft;
EXPLAIN (COSTS OFF, VERBOSE) EXECUTE stmt_ft;
QUERY PLAN
----------------------------------------
Foreign Scan on public.ft
Output: c1, c2
Remote SQL: SELECT c1, c2 FROM
s1.lt
(3 rows)
EXECUTE stmt_ft;
c1 | c2
----+-------
1 |
s1.lt
(1 row)
Thanks & Regards,
Rajkumar Raghuwanshi
QMG, EnterpriseDB Corporation
pgsql-hackers
by date:
Previous
From:
"David G. Johnston"
Date:
04 April 2016, 06:05:44
Subject:
Re: pgbench more operators & functions
Next
From:
Craig Ringer
Date:
04 April 2016, 06:19:06
Subject:
Re: Timeline following for logical slots
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
×
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Postgres Pro Shardman
Postgres Pro Enterprise Manager
Postgres Pro ProGate
Cloud Solutions
Postgres Extensions
Cases
Courses
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies