To prepare a PostgreSQL source system for PowerExchange CDC, you must perform a few configuration tasks.
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.
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.
Copy the plug-in, pwx_decode.dll, for creating the replication slot that PowerExchange uses from the PowerExchange root directory to the PostgreSQL lib directory.
When the PowerExchange capture process runs, PostgreSQL uses this plugin to create the "pwx_repl" replication slot. Also, 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.