Questions tagged [postgres-fdw]

Postgres foreign-data wrapper is a module which can be used to access data stored in external PostgreSQL servers.

144 questions
18
votes
3 answers

Postgres: user mapping not found for "postgres"

I'm connected to schema apm. Trying to execute a function and getting below error: ERROR: user mapping not found for "postgres" Database connection info says: apm on postgres@PostgreSQL 9.6 psql version: PostgreSQL 9.6.3, compiled by Visual C++…
Vikram
  • 347
  • 1
  • 3
  • 8
14
votes
3 answers

Create a foreign table pointing to a view in Postgres

Is it possible to create a foreign table, using Postgres Foreign Data Wrapper, that points to a view instead of a table?
Nícolas Iensen
  • 3,899
  • 4
  • 22
  • 26
10
votes
1 answer

Postgres: Trigger on FOREIGN TABLE

I would like to use postgres_fdw and house a FOREIGN TABLE in my database. Is it possible to define a trigger on the local server for this FOREIGN TABLE that recognizes an INSERT event on the remote server. If so, please provide an example. Data…
J Spratt
  • 1,762
  • 1
  • 11
  • 22
10
votes
1 answer

Create index on foreign table PostgreSQL

I am using postgres_fdw to create a link between two databases. I then setup the foreign tables and do some inserts from the foreign tables to my live tables. I've noticed it is taking quite some time though because they don't have indexes. Can you…
uraza
  • 907
  • 4
  • 12
  • 22
7
votes
2 answers

postgres_fdw: possible to push data to foreign server for join?

suppose I have a query like select * from remote_table join local_table using(common_key) where remote_table is a FOREIGN TABLE with postgres_fdw and local_table is a regular table. local_table is small (100 rows) and remote_table is large…
wrschneider
  • 17,913
  • 16
  • 96
  • 176
7
votes
1 answer

Using postgres_fdw via ssh tunel

can be used postgres_fdw to connect via ssh tunnel? The database is accessible only from the DB server, andI need to join from another remote server. The DB server log in with SSH keys. If it's possible, how please?
peterko
  • 503
  • 1
  • 6
  • 18
6
votes
2 answers

DBLINK vs Postgres_FDW, which one may provide better performance?

I have a use case to distribute data across many databases on many servers, all in postgres tables. From any given server/db, I may need to query another server/db. The queries are quite basic, standard selects with where clauses on standard…
Mark Giaconia
  • 3,844
  • 5
  • 20
  • 42
6
votes
4 answers

postgres_fdw cannot connect to server on Amazon RDS

I have two Postgres 9.3.5 instances in RDS, both in one security group that allows all inbound traffic from within the security group and all outbound traffic. I'm trying to set up one database to be able to select from a few tables from the other…
pail
  • 193
  • 4
  • 10
5
votes
1 answer

Import Foreign Type with postgresql_fdw

I have a database with a custom type which could not import using the IMPORT FOREIGN SCHEMA public FROM SERVER replica_db1 INTO db1 since CREATE FOREIGN TABLE fails. How do I import custom type? Also, the custom type is referred from the public…
skuppa
  • 135
  • 9
5
votes
1 answer

running camunda with Spring boot & mongodb

Has anyone been able to get Camunda to run with Spring Boot and mongodb? I tried several approaches and always got into a brick wall. What I tried: 1. jpa / hibernate-ogm I was able to initiate a connection to mongo after creating my own…
Amnon
  • 2,212
  • 1
  • 19
  • 35
5
votes
3 answers

May I alter SERVER for foreign table?

According to the DOC I can not do that. But fully recreate table force me to do huge work instead of simple: ALTER FOREIGN TABLE table_name ALTER SERVER new_server_name;
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158
4
votes
1 answer

Why is PostgreSQL not saving to disk when doing long-running INSERT … SELECT …?

I'm using a foreign data wrapper to move a large chunk of data (with a very simple date transformation on one column) to a local database. Using a Django cursor (because I'm too lazy to pull out the credentials to create a raw psycopg2 cursor) I do…
l0b0
  • 55,365
  • 30
  • 138
  • 223
4
votes
2 answers

Postgres_FDW not pushing down WHERE criteria

I'm working with two PostgreSQL 9.6 databases and am trying to query one of the DB's from the other using postgres_fdw (one is a production backup DB that has the data and the other is a db for doing various analyses). I've come across some odd…
4
votes
2 answers

Can a foreign table have same name as a local table?

My problem is that I am using PostgreSQL database and want to import a table named vfm from other database, say B. But there's a table with the same name table in my current database (A). I'm getting an error in my query saying the relation exists…
4
votes
1 answer

function not found in trigger function postgres_fdw

I have created two postgres databases. Version 9.5.4. The first database called persist. I am working with some example code from postgrest for authentication. The code works great, here is my persist database definition: create schema…
Greg
  • 6,571
  • 2
  • 27
  • 39
1
2 3
9 10