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
Remote query execute with postgres_fdw, using an indexes
As mentioned here postgres_fdw has no access to indexes.
A workaround is to create an view on remote server and then create foreign table wrapper to this view on local one.
But what if I want to pass a parameter to my view? Normally I would create…

countryroadscat
- 1,660
- 4
- 26
- 49
2
votes
0 answers
Using postgres_fdw for crossdatabase queries
I have a localhost Postgres 9.3 server running with multiple database. One of those is Travelingo_data.
It has the extensions postgres_fdw and postgis installed.
What I would like to do is to run a series of queries from another database on the same…

Pim Verver
- 21
- 1
- 4
2
votes
0 answers
What are the options to integrate external data into Cloudera Impala?
My use case is that I have an API to access SAP ERP data and would like to integrate both the meta-data (list of tables) and the actual data, so that Impala would join HDFS data with the data coming from my API. The best would be to use a similar…

David Beck
- 361
- 2
- 8
2
votes
1 answer
How to bind dynamic JSON objects to PostgreSQL, using mongodb_fdw?
The Foreign Data Wrapper for MongoDB is pretty awesome! I've gotten it to work using these instructions, apart from:
an object with dynamic fields within it - which PostgreSQL type to use for such?
{
"key1": some,
...
}
an array of objects -…

akauppi
- 17,018
- 15
- 95
- 120
1
vote
1 answer
Upgrading `go version` for `CGO` a Postgres FDW project
I am trying to build the steampipe-postgres-fdw project in a Mac M1 with the latest go version (1.21).
It currently uses go version 1.19.
The FDW is designed to work with Postgresql 14.
The project comes with a Makefile which generates the go files…

Binaek Sarkar
- 617
- 8
- 21
1
vote
0 answers
Limitations in FDW code on passing List* metadata between GetForeignPlan() and BeginForeignScan()
I'm writing an FDW for a non-SQL data source. Platform is Windows 10, C (MS Visual Studio), Postgresql 14. My FDW code is modeled after FDW example codes I have studied such as SQLite, JSON, CSV, File, DB2 and others. There is a common practice of…

Kenigmatic
- 448
- 6
- 16
1
vote
1 answer
Use value from current_settings to establish postgres_fdw connection
I am trying to set up a PostgreSQL Foreign Data Wrapper and to access the credentials from current_settings so that they are not hard-coded in my source code.
Here is my code:
CREATE EXTENSION postgres_fdw;
CREATE SERVER remote_server
FOREIGN DATA…

CedricLaberge
- 592
- 2
- 7
- 22
1
vote
1 answer
Postgres FDW could not serialize access due to concurrent update
This is similar to this question Postgres could not serialize access due to concurrent update, however because of characteristics of FDW the suggestions aren't applicable.
The error is "could not serialize access due to concurrent update" from the…

user1487861
- 420
- 6
- 16
1
vote
0 answers
Performance of postgres_fdw via an SSH tunnel
I'm experiencing severe performance issues when trying to access data from a remote Postgresql server running on AWS, accessed via an SSH tunnel, using a foreign data wrapper on a local non-AWS Postgresql server.
The setup:
Remote data is on a…

simonhaven
- 11
- 2
1
vote
0 answers
postgres - How to check if connection to foreign table actually exists
I have two databases (postgresql 14): let's call them master and slave.
Let's create table in slave db:
create table sample_slave(
id int,
name varchar,
location varchar
);
Then in master db:
CREATE TABLE sample(
id serial primary…

Vikl007
- 11
- 1
1
vote
0 answers
Postgres FDW - Triggers to update local schema when remote schema has a DML
I have a client website that has a Postgres backend which I consider as my remote database. I use FDWs to connect from my local database to the remote DB.
So what I have is :
Remote DB ->remote Schema -> Has a table called remote_work_packages
On my…

Priya Sooraj
- 23
- 4
1
vote
2 answers
Read Parquet files directly while using Postgres
I am trying to install an extension to postgres that will help me write postgres queries to read data directly from parquet files.
This is the extension I found - https://github.com/pgspider/parquet_s3_fdw
After installing the required dependencies…

Brijesh Patel
- 76
- 9
1
vote
1 answer
postgres_fdw extension not interpreting right data types
I'm trying to gather some experience with ETL processes and for this reason I'm looking for ways to transfer data from one place to the other. Right now, I want to get a better hang of the postgres_fdw extension, because, if I understood it…

CelioxF
- 63
- 5
1
vote
1 answer
Unable to set fdw_startup_cost for postgres_fdw server
I would like to change the default value for the option fdw_startup_cost for an existing postgres_fdw server but am getting an error message stating that option fdw_startup_cost is not found, even though its an option according to the documentation…

Steve
- 11
- 1
1
vote
2 answers
How to get the generated id from an insert to a postgres foreign table?
I'm using PostgreSQL version 13.2 and I need to do an insert into a foreign table (Postgres also), that has a sequence generated id, returning the generated id from the foreign table.
I've added the "postgres_fdw" extension, created the server and…

João Ferreira
- 191
- 1
- 10