Postgres foreign-data wrapper is a module which can be used to access data stored in external PostgreSQL servers.
Questions tagged [postgres-fdw]
144 questions
0
votes
0 answers
Select from PostgreSQL 11 foreign data wrapper (to PG 9.5 remote) 15x slower
A select from a foreign wrapped view takes 15+ times longer to complete than the direct select on the source database.
Tried Adding USE_REMOTE_ESTIMATE 'true' to the foreign server. Also tried killing the where clause altogether (baking it into the…

quickdraw
- 101
- 8
0
votes
1 answer
Connect to Hive database tables using postgresql-fdw from postgresql server
Cant connect from postgresql server to hive databases on remote server.
Tried using the following queries but doenst work. Connection established but no response back from hive server.
--create extension postgres_fdw;
DROP USER MAPPING IF EXISTS …

nader
- 141
- 2
- 13
0
votes
0 answers
Is postgres_fdw reliable to do daily refresh of 5 million rows?
I'm using postgres_fdw to refresh my application database on daily bases.
So, is this the best process to follow?

UmaShankar
- 221
- 5
- 14
0
votes
1 answer
Copy huge datasets between two Postgres servers
I want to copy huge datasets between two postgres servers. Specifically I want to:
copy some columns (not all) from two tables in source db server, to
a single table in destination db server.
rename those columns in destination table (as datasets…

Data Quests
- 1
- 2
0
votes
1 answer
Postgresql and dblink: how do I do an UPDATE FROM?
Here's what works already, but it's using a loop:
(I am updating the nickname, slug field on the remote table for each row in a local table)
DECLARE
row_ record;
rdbname_ varchar;
....
/* select from local */
FOR row_ IN SELECT rdbname, objectvalue1…

JL Peyret
- 10,917
- 2
- 54
- 73
0
votes
1 answer
Trigger execution for foreign table in postgresql
I have two databases db1 and db2.db2 has foreign table, say tableA whose schema has been imported from db1. A trigger runs on tableA in db1 for every row update.
Now using postgres_fdw I can fetch the records from db2 but unable to update any record…
0
votes
2 answers
Foreign table inserts don't use the remote sequence
I have a set of applications accessing two different PostgreSQL 9.6 DBs on the same server. Due to some application limitations, one application accesses a handful of tables via FDW in one DB to the other.
Something like this:
DB1.fdw_table_a ->…

Edd
- 53
- 1
- 5
0
votes
0 answers
PostgreSQL fdw performance issue
When I'm querying in PostgreSQL where I have used same foreign table in both from clause and where clause I'm getting timeout error. Whereas if I remove where clause and add it as cte it executes in less than a second. Kindly advise if this foreign…

Kaja Hussain
- 76
- 5
0
votes
1 answer
How to create tables from imported foreign schema with plpgsql loop function
I am trying to create tables from all the tables that have been imported into my foreign tables via import foreign schema.
The reason I want to do this is simply to copy data from one PostgreSQL server database to another. I know that I won't get…

aneh
- 3
- 1
0
votes
1 answer
How to connect from localhost to multiple remote servers with postgres_fdw in postgresql function procedure?
I want to connect (SELECT) from a local postgresql procedure to a remote server in order to store this table in localhost. I try using this:
CREATE SERVER foreign_server
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host ip_server,…

July
- 442
- 4
- 11
0
votes
1 answer
Django OneToOneField on foreign table
I'm trying to setup a new server with foreign tables (using postgres_fdw) that weren't foreign tables previously, and I have some OneToOneFields pointing to these tables. This doesn't work out of the box - OneToOneFields use foreign keys, and…

Crag
- 1,723
- 17
- 35
0
votes
0 answers
Query to foreign table impossible due to index on custom stored function value in host database
I have a following situation.
In database A on server I, let's call it Host DB, there is a table, that has a following sample create script:
CREATE TABLE public.some_table (
id SERIAL PRIMARY KEY,
some_field TEXT
);
CREATE INDEX…

Paweł Sopel
- 528
- 4
- 17
0
votes
1 answer
Install packages on PostgreSQL RDS AWS
I want to access LDAP data from postgreSQL query. I can use FDW (foreign data wrapper) package (https://wiki.postgresql.org/wiki/Foreign_data_wrappers#LDAP_Wrappers) but it seems like not supported with RDS yet. Is there any other way I can enable…

Himanshu Parmar
- 427
- 5
- 10
0
votes
1 answer
redis_fdw on rds postgres
Running create extension redis_fdw gives below error. Currently is there any alternative way to create foreign data wrapper for redis and achieve similar goals as this project on RDS ?
Extension "redis_fdw" is not supported by Amazon RDS

fortm
- 4,066
- 5
- 49
- 79
0
votes
2 answers
How would you create a unique index on a foreign table?
Database 1 has foreign tables a and b on database 2.
How can we create indexes on these foreign tables a and b. These foreign tables are wrappers over database2.c and database2.d tables respectively, which do have the necessary indexes in place.…

Tisha
- 827
- 3
- 11
- 34