Skip to main content

Questions tagged [postgresql-fdw]

Foreign Data Wrappers (FDW) enable access to remote data stores from PostgreSQL.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

I am trying to recover a client's data hosted on an iSeries server. It is very probably a DB2. There are 2000+ tables to transfer. I have access with jdbc and tried with DBeaver (which gives the best ...
JC Boggio's user avatar
  • 197
2 votes
1 answer
71 views

I'm making a FDW (Foreign Data Wrapper) in PostgreSQL for myself using C. And in the test environment below, myFDW receives the query with/without LIMIT clause case by case. Test environment: psql → ...
toratora7964's user avatar
1 vote
1 answer
751 views

I have a database with a table whose primary key is a serial column, or a column with a locally-computed default value that prevents conflicts, for instance: CREATE TABLE foo ( foo_id serial ...
user2233709's user avatar
1 vote
1 answer
2k views

I have 2 databases db1 & db2, I created postgres_fdw into db1 & db 2 with: CREATE EXTENSION postgres_fdw; I configured server and user mapping into db2 : CREATE SERVER remote_server FOREIGN ...
Mohammadreza Ataei's user avatar
1 vote
1 answer
856 views

I am trying to create a user mapping in PostgreSQL without a password, but I am encountering an error that says. local_db=> select * from employee; ERROR: could not connect to server "...
Aymen Rahal's user avatar
0 votes
1 answer
174 views

I have an OLTP database and ETL jobs are running in the same database in the background. I was thinking of separating the OLTP and ETL instances so that resource utilization would be distributed. ...
Sajith P Shetty's user avatar
0 votes
1 answer
96 views

Does the PostgreSQL executor / planner have the ability to avoid n+1 querying of FDW tables? If so, what conditions have to be in place for this to happen, e.g. does the FDW need to emit a specific ...
ldrg's user avatar
  • 719
4 votes
1 answer
5k views

I am using postgres 13 and created a foreign server with use_remote_estimate: on and fetch_size: 10000. tableA here is a partition table by created_date. The query is running fine if the number of ...
Sushma Yadav's user avatar
0 votes
1 answer
145 views

This is new to me. I have been searching the net but no result. I have a server, Server A, that has been running for a few weeks, it is a new server. I set up FDW for this server to access all tables ...
padjee's user avatar
  • 327
0 votes
2 answers
752 views

Recently I setup Forward Data Wrapper. Here is what I do: CREATE SERVER foreign_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '192.168.125.1', port '5432', dbname 'template1 '); IMPORT ...
padjee's user avatar
  • 327
0 votes
2 answers
3k views

I create a foreign server in postgresql. Before adding foreign table, I want to get list of tables in this foreign server. Is there any way I can do this? This sql query show the created foreign ...
Ali dashti's user avatar
0 votes
1 answer
918 views

I imported a foreign schema using IMPORT FOREIGN SCHEMA. Now I'm able to access all the table content in that schema, but still unable to access any of the functions. Is it possible to execute a ...
Rajan Pandey's user avatar
0 votes
1 answer
3k views

We're using foreign data wrappers in a database which points to another server (which is a read-only replica). We run scheduled jobs using python ( more on this here: https://github.com/sqlalchemy/...
K. Anye's user avatar
  • 13
0 votes
1 answer
3k views

I had a question regarding the extension postgres_fdw. I am trying to use postgres_fdw to import foreign tables from DB A to DB B. These databases are on the same host. In Database B, I have a set of ...
user16573033's user avatar
0 votes
1 answer
1k views

I want to to replicate A TABLE from one server A to another B so that A and B always in-sync. This table on server A has like 4 - 5 million rows, whereas the table B is empty. What I want to do is ...
padjee's user avatar
  • 327
0 votes
1 answer
48 views

I'm not sure what technology I need because I'm not a DBA, but I'm sure there's a good way to do this. I have a postgres database with this schema (top two tables exist): So I'm trying to add the 3rd ...
MetaStack's user avatar
  • 103
3 votes
1 answer
2k views

Is it possible to execute functions that are located on a foreign server using postgres_fdw? If not, is there any available workaround?
Lev's user avatar
  • 243
1 vote
0 answers
315 views

Designing storage architecture for Petabyte-scale geospatial data; starting from scratch. Creating a MinIo cluster to store the objects in S3 buckets. To store the metadata, I’m considering the Apache ...
jpinelo's user avatar
  • 111
1 vote
1 answer
446 views

I have a view stored on a foreign Postgres server (v 9.3) which pulls all of the data that was posted for the day. I have foreign tables (using postgres_fdw) stored on my local Postgres servers (...
dcbeckman's user avatar
4 votes
2 answers
3k views

I have a Postgres server in Google SQL Cloud with multiple databases. I want to create a FOREIGN DATA WRAPPER between them. If I use the server's remote IP it works: CREATE SERVER "some_db_fdw&...
WillyC's user avatar
  • 143
6 votes
2 answers
3k views

We are using a foreign data wrapper to query across databases on a single PostgreSQL RDS. The foreign data wrapper server needs a user mapping for each user who will query against the remote server. ...
Brylie Christopher Oxley's user avatar
1 vote
1 answer
391 views

I have a server with roughly 7000 databases that all have a practically identical schema. I've been querying them and collecting information about their contents in a separate database on the server. ...
Encomium's user avatar
  • 117
0 votes
1 answer
217 views

I have a postgres sharding based on postgres_fdw and postgres partitioning, lets say 3 machine (1 coordinator and 2 Shard machines). What I want to do is have read replica version of same? How should ...
hardik24's user avatar
0 votes
1 answer
608 views

We have been trying to partition a Postgres database on google cloud using the built-in Postgres declarative partitioning and postgres_fdw as explained here. We are running commands as follow: Shard ...
hardik24's user avatar
0 votes
1 answer
450 views

We are creating enterprise-grade SaaS where we will have many 1,000s of customers. We are considering creating a database in the Postgres server for every customer to ensure enterprise-grade security/...
pyramation's user avatar
0 votes
1 answer
1k views

So I have tables in two different databases that I need to analyze together. I am using fdw to do so. However I am running in to weird behavior with my joins. Keep in mind the following snippets are ...
dadrake's user avatar
0 votes
1 answer
168 views

I have a foreign table defined with file_fdw, which reads the data from a CSV file. Postgresql parses the CSV file and converts the date for example from YYYYMMDD to YYYY-MM-DD. This works fine. My ...
ceving's user avatar
  • 379
0 votes
1 answer
1k views

I need to create a sequence and need to use the sequence for auto increment id for more than 2 databases on 2 separate servers. I'm referring below doc for that(for test purpose): https://paquier.xyz/...
Shiwangini's user avatar
1 vote
1 answer
454 views

Given this query: select * from fdw_schema.customer c where exists ( select * from fdw_schema.purchase p where c.id = p.customer_id and p.purchase_date > now() - interval '30 days'); ...
Chris Curvey's user avatar
0 votes
2 answers
408 views

I've set up a PostgreSQL FDW server with the following table, sharded by user_id over four servers: CREATE TABLE my_big_table ( user_id bigint NOT NULL, serial bigint NOT NULL, -- ...
gertvdijk's user avatar
  • 227
4 votes
1 answer
5k views

I've set up a PostgreSQL FDW server with the following table, sharded by user_id over four servers: CREATE TABLE my_big_table ( user_id bigint NOT NULL, serial bigint NOT NULL, -- ...
gertvdijk's user avatar
  • 227
0 votes
1 answer
1k views

We have configured postgres_fdw to move data from a DB to remote DB. It works fine but the large object field's data in source db not getting copied to remote DB. This is the statement used to copy: ...
Valsaraj Viswanathan's user avatar
2 votes
1 answer
855 views

How can I check if the structure of a foreign table was changed in the source database in order to know when to re import it. Foreign table was imported by foreign-data wrapper postgres_fdw (...
Radu Dumbrăveanu's user avatar
1 vote
1 answer
295 views

I have a large CSV file sorted on the first column. Here is an extremely simplified version): a 7 a 4 b 6 c 3 c 9 c 2 I want to group by the first column and sum the second. How do I tell the ...
user2297550's user avatar
5 votes
1 answer
339 views

I have a remote postgres table using RDW. It contains a JSONB column and I use values in that JSONB for the WHERE condition. The remote table has a GIN index on the JSONB column and an index on the ...
Pascal's user avatar
  • 153
9 votes
1 answer
9k views

I need to link my table with another one which is in different database(say table logs in device db and table accounts in user db, both on same server). So using Foreign Data Wrapper I create a ...
Bonje Fir's user avatar
  • 193
3 votes
0 answers
343 views

Context I'm currently looking for and comparing different options for sharding data from a Postgres database into multiple ones. The end result may be something like having instances of a web ...
ginmrt's user avatar
  • 31
4 votes
1 answer
6k views

Where do I set the "Cost Estimation Options" for postgres_fdw. Specifically I want to add use_remote_estimate. test=# SET use_remote_estimate=true; ERROR: unrecognized configuration parameter "...
Evan Carroll's user avatar
  • 65.8k
0 votes
0 answers
2k views

I have this base query and execution time around 400ms: SELECT s.parcelno FROM export.scans s INNER JOIN plnum_customerno cp ON cp.pl_number = s.parcelno WHERE s.type_of_scan = '05' AND ...
Karlo Petravić's user avatar
3 votes
2 answers
3k views

PostgreSQL v9.6, postgres_fdw Foreign table CREATE FOREIGN TABLE user_info ( id bigint , info jsonb ) SERVER server_test_fdw OPTIONS(SCHEMA_NAME 'public', TABLE_NAME 'user_info_raw' ); -- ...
Luan Huynh's user avatar
  • 2,010
0 votes
1 answer
933 views

Case explained I'm facing difficulties concerning performance of queries using a Postgres 9.5.4 database set up on a different server connecting via Foreign Data Wrapper to another instance of ...
Kamil Gosciminski's user avatar
2 votes
1 answer
1k views

I have two databases. In each database I have an employee table which differ from each other in the number of columns and column names. Here is what the table looks in the first database: Emp_ID ...
Sayad Xiarkakh's user avatar
15 votes
1 answer
27k views

I'm trying to set up a user with limited permissions that would be able to create foreign tables. I have two databases, hr_db and accounting_db. I have created an hr_user user for hr_db and a ...
Shaun's user avatar
  • 251
13 votes
1 answer
9k views

The following query on a foreign takes about 5 seconds to execute on 3.2 million rows: SELECT x."IncidentTypeCode", COUNT(x."IncidentTypeCode") FROM "IntterraNearRealTimeUnitReflexes300sForeign" x ...
J-DawG's user avatar
  • 283
1 vote
1 answer
58 views

I a now work mainly with Postgres 9.5, but I alsoo need to connect to a number Postgres 8 databases connect them probably as different schemas, if that is possible. Are foreign database wrappers the ...
vfclists's user avatar
  • 1,093
9 votes
2 answers
3k views

It seems to be disallowed to add a Foreign Key constraint to a foreign table. Is there any other way to do this? My two tables have these constrains on the remote server. More specific details: I ...
odinho - Velmont's user avatar
1 vote
0 answers
216 views

I have a linux box with centos 6.7 and postgres 9.3.9. I have a foreign data wrapper throught an oracle 11.2 box and a jdbc driver. It's working fine since several months, but yesterday I had to ...
mélanie's user avatar
2 votes
0 answers
3k views

I have a table on database temp_db named external_objects and an index on the field id, which is an MongoDB id (like 5458d717cd07870859000003). When I explain this select at this database, I got this ...
Luiz E.'s user avatar
  • 125
0 votes
0 answers
59 views

I'm importing and legacy database to a new database, and changing data format. In this legacy database, I have data as following: Interaction id: 5458d717cd07870859000004 user_id: ...
Luiz E.'s user avatar
  • 125
6 votes
2 answers
2k views

In 9.4b2, postgresql_fdw doesn't know how to "push down" aggregate queries on remote tables, e.g. > explain verbose select max(col1) from remote_tables.table1; ...
zwol's user avatar
  • 251