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
2
votes
1 answer
Postgres 11 FDW can't find partitioned table
Trying to access a partitioned table using postgres 11 foreign data wrapper. I can access the underlying tables but not the table.
create schema foo;
CREATE TABLE foo.test1 (
city_id int not null,
logdate date not null,
…

user1487861
- 420
- 6
- 16
2
votes
1 answer
Postgres BIGSERIAL does not share sequence when inserts are made with multiple remote fdw sources
I am trying to insert into a table in a Postgres database from two other Postgres databases using Foreign Data Wrappers. The objective is to have an autogenerate primary key, independent of the source, as there will be more than two in.
I first…

TheWildHealer
- 1,546
- 1
- 15
- 26
2
votes
0 answers
Missing binaries for postgres_fdw and uuid-ossp
I'm upgrading my database from 10.4 to 11.3 but when performing the check when using pg_upgrade, I am getting the following errors:
could not load library "$libdir/uuid-ossp": ERROR: could not access file "$libdir/uuid-ossp": No such file or…

Shane
- 21
- 1
- 2
2
votes
1 answer
Use PostgreSQL pg_prewarm for a foreign table
I have many foreign tables imported by IMPORT FOREIGN SCHEMA:
CREATE USER MAPPING FOR myuser
SERVER postgres
OPTIONS ( user 'myuser', password 'mypass');
IMPORT FOREIGN SCHEMA public from server postgres INTO public;
I have many queries that…

madjardi
- 5,649
- 2
- 37
- 37
2
votes
1 answer
My remote Postgres query seems to hang forever
I am running the following query on a remote Postgres instance, from a local client:
select * from matches_tb1 order by match_id desc limit 10;
matches_tb1 is a foreign table and has match_id as unique index. The query seems to hang forever. When…

Friends_little_black
- 51
- 6
2
votes
1 answer
Import and merge rails database tables
I have 3 separate ruby on rails applications running PostgreSQL databases, all with the same tables (and columns) but different values.
For example :
app 1 TABLE
name surname postcode
----------
tom smith so211ux
app 2 TABLE
name surname…

Tom Collom
- 37
- 4
2
votes
1 answer
Need parallel append on foreign tables in PostgreSQL
We developed a fdw based on postgres_fdw that implement searchs at big repositories (big data) that keep the data compressed. We are tring to use the concept of postgres partition tables, so that we could parallel the search on many partitions at…

Sanyo Moura
- 71
- 7
2
votes
0 answers
Parallel append on foreign tables in PostgreSQL 11
Is it possible to achieve parallel append on foreign tables in PostgreSQL 11 (just like on local tables)?
Local tables:
# select version();
version …

Vladimir Aleshin
- 181
- 4
2
votes
1 answer
Can I use postgres_fdw without foreign tables defined?
I have a production database "PRODdb1", with a read-only user account. I have a need to query(select statement) this database and insert the data into a secondary database named "RPTdb1". I originally planned to just create a temp table in PRODdb1…

calKno
- 21
- 1
2
votes
2 answers
how can I access large object store on foreign table
I have set up postgres_fdw to access a 'remote' database (in fact its on the same server). Works fine. Except one of the columns is the oid of a large object, how can I read that data?

pm100
- 48,078
- 23
- 82
- 145
2
votes
1 answer
Query two different postgres databases stored in different servers
I have two POSTGRES databases stored in different servers.
The "Firstdb" is version 9.2 and it is stored in a LAN server, port 5432.
The "Seconddb" is version 10 and it is stored as localhost to my PC, port 5432.
I have access to both of them…

Koumarelas Ioannis
- 71
- 1
- 2
- 9
2
votes
0 answers
import foreign schema with postgresql_fdw
I have two instances of postgreSQL , one as the data source (port 5433) and the other as data access layer(host of foreign data wrappers on port 5432).
I want to import the schema of postgreSQL table (Dzlog) so that I dont have to map each column in…

SillyPerson
- 589
- 2
- 7
- 30
2
votes
0 answers
PostgreSQL 9.5: Creating foreign key across database using Foreign Data Wrapper (FDW)
I want to create foreign key in the current database table by referring other database table.
So i have decided to go with FDW.
I have done the following steps:
Step 1: Created extension
CREATE EXTENSION postgres_fdw;
Step 2: Created foreign…

MAK
- 6,824
- 25
- 74
- 131
2
votes
2 answers
How can you do an update to a table in another database using postgres dblink?
The query that has to be executed is as simple as below -
Update employee set is_done=true;
The table that I want to update is only present in another database.
I have been using these kinds of dblink queries.
INSERT Into mytable select * from…

Tisha
- 827
- 3
- 11
- 34
2
votes
1 answer
Updating a PostgreSQL table from a CSV file
I am trying to find a way to automatically update data from a csv file on a PostgreSQL table.
The csv file holds LabVIEW test data, which will renew with every execution and is stored on the local computer.
So far I am able to import data from the…

L Marfell
- 339
- 2
- 4
- 15