7 Oracle GoldenGate Classic for PostgreSQL
- Deploying Oracle GoldenGate Classic Architecture for PostgreSQL Platforms
- Finding Oracle GoldenGate for Non-Oracle (PostgreSQL) within the Oracle Cloud Marketplace
- Launching Oracle GoldenGate Classic for Non-Oracle (PostgreSQL)
- Connecting to Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) Compute Node
- Working with Oracle GoldenGate Classic for Non-Oracle (PostgreSQL)
Deploying Oracle GoldenGate Classic Architecture for PostgreSQL Platforms
Using Oracle GoldenGate Classic Architecture on Marketplace, you can deploy and manage your deployment from a single location.
Here are the prerequisites which are required before deployment:
- Oracle Cloud Account
- Access to compute node resources within Oracle Cloud Tenant
Parent topic: Oracle GoldenGate Classic for PostgreSQL
Finding Oracle GoldenGate for Non-Oracle (PostgreSQL) within the Oracle Cloud Marketplace
- Log in to Oracle Cloud Marketplace.
- From the Oracle Cloud Marketplace home page, use the search box under Applications and search for the keyword GoldenGate.
- From the Search Results, select Oracle GoldenGate for Non-Oracle.
Parent topic: Oracle GoldenGate Classic for PostgreSQL
Launching Oracle GoldenGate Classic for Non-Oracle (PostgreSQL)
Parent topic: Oracle GoldenGate Classic for PostgreSQL
Connecting to Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) Compute Node
- Log in to your Oracle Cloud Console.
- Select Compute -> Instances.
- Select the hyperlink name of the compute node. The public IP Address is listed under Primary VNIC Information.
- To access the compute node where Oracle GoldenGate is running, connect as the
opc
account using SSH. For more information on how to access a node using theopc
account refer to Connecting to an Instance.
ssh -i <private-key-filename> opc@<public-id-address>
Parent topic: Oracle GoldenGate Classic for PostgreSQL
Working with Oracle GoldenGate Classic for Non-Oracle (PostgreSQL)
After deploying Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) on Oracle Cloud Marketplace, you can access the latest release of Oracle GoldenGate Classic for Non-Oracle (PostgreSQL).
Before you can start using Oracle GoldenGate Classic for Non-Oracle (PostgreSQL), there are a few tasks that you must perform to ensure that your environment is complete and ready to replicate your data. Before you begin data replication, you must perform the following tasks:
Topics:
- Establishing Connectivity
- Oracle GoldenGate for PostgreSQL Requirements
- Creating Database User and Schema
- Setting up and Configuring odbc.ini File
- Starting GGSCI
- Registering a Replication Slot
- Enabling Supplemental Logging for a Source PostgreSQL Database
- Configuring and Creating a Remote Extract for PostgreSQL
- Configuring and Creating a Remote Replicat for PostgreSQL
- Establishing Connectivity
- Oracle GoldenGate for PostgreSQL Requirements
Before you can begin replicating data, for a PostgreSQL database, review the instance, database,LD_LIBRARY_PATH
, and user requirements. - Creating Database User and Schema
- Setting up and Configuring odbc.ini File
- Starting GGSCI
Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) allows you to quickly access the GoldenGate Service Command Interface (GGCSI
) and is preconfigured with a running Manager process. After logging in to the compute node, you can findGGCSI
from thepostgres
directory(/home/opc/postgres)
. - Registering a Replication Slot
Oracle GoldenGate needs to register the extract with the database replication slot. - Enabling Supplemental Logging for a Source PostgreSQL Database
- Configuring and Creating a Remote Extract for PostgreSQL
To capture transactional data from a source PostgreSQL database, you must configure a capture process, also known as an Extract. To build an Extract, you can perform the following steps with Oracle GoldenGate for Non-Oracle. - Configuring and Creating a Remote Replicat for PostgreSQL
Parent topic: Oracle GoldenGate Classic for PostgreSQL
Establishing Connectivity
The Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) on Oracle Cloud Marketplace compute node acts as a hub where you can manage your connections to source and target PostgreSQL databases. To establish connectivity from an Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) compute node to your on-premises PostgreSQL database, use the following options:
- IPSec VPN
- FastConnect
For establishing an IPSec VPN with OCI, refer to IPSec VPN documentation. For establishing a FastConnect connection, refer to the FastConnect documentation.
Oracle GoldenGate for PostgreSQL Requirements
Before you can begin replicating data, for a PostgreSQL database, review the
instance, database, LD_LIBRARY_PATH
, and user requirements.
- Oracle GoldenGate for PostgreSQL requires certain PostgreSQL client
libraries to replicate the data and therefore, you must Install minimum PostgreSQL client
library. See Installing for PostgreSQL in
Installing Oracle GoldenGate Guide and Using Oracle GoldenGate for PostgreSQL
chapter of Using Oracle GoldenGate for Heterogeneous Databases. These
sections contain important information regarding database requirements and supported
features.
- To install PostgreSQL client, execute:
sudo yum install postgresql-client.
Note:
While installing PostgreSQL client or plugin, ensure that the PostgreSQL database version matches with PostgreSQL client and plugin.- For database version PostgreSQL 11, it is
sudo yum install postgresql11-contrib
. - For database version PostgreSQL 10, it is
sudo yum install postgresql10-contrib
.
- For database version PostgreSQL 11, it is
- To install PostgreSQL client, execute:
- Check whether or not the PostgreSQL client library (
LIBPQ
) exists. - After the installation is complete, add the
LD_LIBRARY_PATH
. If the PostgreSQL client library path is-/opt/pg/lib
and the Oracle GoldenGate home directory path is/opt/ogg/postgresql
, then setLD_LIBRARY_PATH
asexport LD_LIBRARY_PATH= /opt/pg/lib:/opt/ogg/postgresql/lib:$LD_LIBRARY_PATH
.
Creating Database User and Schema
- Create database user
ogg1
with passwordogg1
. See PostgreSQL 12 Documentation - Create User. - Create schema. See PostgreSQL 12 Documentation - Create Schema.
- Create database. See PostgreSQL 12 Documentation - Create Database.
- Grant role permissions to the user for more privileges. See PostgreSQL12 Documentation - Grant Role.
create user ogg1 with password 'ogg1';
CREATE SCHEMA dbo;
CREATE DATABASE qadb;
GRANT replication ON DATABASE qadb TO ogg1;
Setting up and Configuring odbc.ini File
odbc.ini
and
LD_LIBRARY_PATH
, see Database Requirements
PostgreSQL in the Installing Oracle GoldenGate
Guide.
Starting GGSCI
Oracle GoldenGate Classic for Non-Oracle (PostgreSQL) allows you to quickly access
the GoldenGate Service Command Interface (GGCSI
) and is preconfigured with
a running Manager process. After logging in to the compute node, you can find
GGCSI
from the postgres
directory
(/home/opc/postgres)
.
Registering a Replication Slot
Oracle GoldenGate needs to register the extract with the database replication slot.
extr
, then run the following command from GGSCI to register the
Extract:GGSCI> register extract extr with <dbname>
Enabling Supplemental Logging for a Source PostgreSQL Database
To enable supplemental logging for a source PostgreSQL:
Configuring and Creating a Remote Extract for PostgreSQL
To capture transactional data from a source PostgreSQL database, you must configure a capture process, also known as an Extract. To build an Extract, you can perform the following steps with Oracle GoldenGate for Non-Oracle.