Skip to content

ROAPI + Postgres FDW #374

Description

@accforgithubtest

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.]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions