Logical replication works by leveraging PostgreSQL's logical decoding. The Meroxa Connector uses this to consume the changes from PostgreSQL's transaction log and produces a Data Record for every
To add a new resource, see Add Postgres Resource.
In order for logical replication to be used, the configured Resource credentials must have the appropriate permissions to create a replication slot. To create a new user with replication enabled, you can run the following:
If the configured
$PG_USER does not have the ability to create a replication slot, Meroxa will automatically fall back to Polling for changes.
REPLICA IDENTITY is a PostgreSQL-specific table-level setting that determines the amount of information for
Meroxa will still capture
DELETE events, but will only see the resulting change
after, but not the data
before the operation was made.
To capture full changes, run the following:
For more information, see Replica Identity.
The Input for this connector is an Postgres Table.
For example, to create a connector using the CLI, you may use the following command:
The format of the Postgres Table is
public.TableName. You must include the table schema name.
On every update, the Data Record takes the following format: