I am attempting to get my postgres server to connect to roapi via postgres fdw.
I am assuming that this would be possible since roapi supports the postgres wire protocol.
Following the basic steps to create a fdw connection, I am tying the below on the postgres db server as superuser -
CREATE EXTENSION postgres_fdw;
CREATE SERVER roapi_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (
host 'roapi',
port '5432',
fetch_size '100',
use_remote_estimate 'true'
);
CREATE USER MAPPING FOR CURRENT_USER SERVER roapi_server;
IMPORT FOREIGN SCHEMA <insert_roapi_db_schema_name_here>
FROM
SERVER roapi_server INTO public;
I understand that we connect to roapi server without any user credentials.
However, a schema name is necessary in the last sql above (<insert_roapi_db_schema_name_here>).
I tried using public and default, however both didn't work.
Can you pls suggest what options are available to get the postgres server to connect to roapi via fdw.
[I have successfully connected postgres server to a mariadb server using mysql fdw, so the basic set up for postgres fdw works in my set up, just trying to figure out how to get fdw working with roapi.]
I am attempting to get my postgres server to connect to roapi via postgres fdw.
I am assuming that this would be possible since roapi supports the postgres wire protocol.
Following the basic steps to create a fdw connection, I am tying the below on the postgres db server as superuser -
CREATE EXTENSION postgres_fdw; CREATE SERVER roapi_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( host 'roapi', port '5432', fetch_size '100', use_remote_estimate 'true' ); CREATE USER MAPPING FOR CURRENT_USER SERVER roapi_server; IMPORT FOREIGN SCHEMA <insert_roapi_db_schema_name_here> FROM SERVER roapi_server INTO public;I understand that we connect to roapi server without any user credentials.
However, a schema name is necessary in the last sql above (<insert_roapi_db_schema_name_here>).
I tried using
publicanddefault, however both didn't work.Can you pls suggest what options are available to get the postgres server to connect to roapi via fdw.
[I have successfully connected postgres server to a mariadb server using mysql fdw, so the basic set up for postgres fdw works in my set up, just trying to figure out how to get fdw working with roapi.]