Table of Contents

Search

  1. Preface
  2. Part 1: PowerExchange CDC Introduction
  3. Part 2: PowerExchange CDC Components
  4. Part 3: PowerExchange CDC Data Sources
  5. Part 4: Change Data Extraction
  6. Part 5: Monitoring and Tuning
  7. Appendix A: DTL__CAPXTIMESTAMP Time Stamps

CDC Guide for Linux, UNIX, and Windows

CDC Guide for Linux, UNIX, and Windows

Preparing PostgreSQL CDC Sources

Preparing PostgreSQL CDC Sources

To prepare a PostgreSQL source system for PowerExchange CDC, you must perform a few configuration tasks.
  1. Create a PostgreSQL user role that allows PowerExchange to connect to the PostgresSQL database server in logical replication mode to create a replication slot. When you create the role, specify the LOGIN and REPLICATION attributes, for example:
    CREATE ROLE
    pwx_role
    LOGIN REPLICATION;
    To use this command, you must have the CREATEROLE or privilege or be a database superuser.
  2. Ensure that the PostgreSQL postgresql.conf configuration file specifies the
    wal_level=logical
    parameter.
    This parameter determines how much information PostgreSQL writes to the Write-Ahead Log (WAL). The setting of
    logical
    adds information that is required to support logical decoding.
  3. Install the pwx_decode.dll plug-in for creating the replication slot that PowerExchange uses, in one of the following ways:
    • Copy the pwx_decode.dll plug-in from the PowerExchange root directory to the PostgreSQL lib directory.
      When the PowerExchange capture process runs, PostgreSQL uses the pwx_decode.dll plugin to create the "pwx_repl" replication slot.
    • If you do not have the authority to install the plug-in within the PostgreSQL lib directory, you can copy pwx_decode.dll to another location. You then must manually create the replication slot. To create the replication slot, use the following command, which points to the location of pwx_decode.dll:
      SELECT
      slot_name
      FROM pg_create_logical_replication_slot('pwx_repl', '
      path
      /pwx_decode')
    PowerExchange automatically creates the corresponding replication store table that records the DML changes retrieved from the replication slot, if the table does not already exist. If you need to adjust the replication store table for your source environment, you can manually create the table. See Manually Creating the Replication Store Table.

0 COMMENTS

We’d like to hear from you!