Step by Step postgres_fdw

Hello, I will create postgres_fdw and explain data transfer.

 

First of all, we create EXTENSION, the name of which we determine ourselves.

CREATE EXTENSION test;

 

We are creating a server for the machine that we will access to do the dblink task.

CREATE SERVER deneme FOREIGN DATA WRAPPER test OPTIONS (host 'xxx.xxx.xx.xx', dbname 'TEST', port '5432');

 

We are mapping users in two different environments to each other.

CREATE USER MAPPING FOR postgres SERVER cm96 OPTIONS (user 'Test' , password 'test123#');

 

We create schema on the machine where we set up dblink

CREATE SCHEMA Test;

We can move the data with the IMPORT FOREIGN command on the server we created.

IMPORT FOREIGN SCHEMA public FROM SERVER Test INTO Test;

 

 

About tayfun inam

Computer Engineer -PostgreSql-Oracle Database Administrator I am about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 8+years experience.I have OCA,PostgreSql senior Certificates I have worked 50+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.

Leave a Reply

Your email address will not be published. Required fields are marked *