sys_syn_dblink
sys_syn_dblink · PL/pgSQL synchronization processor that pulls sys_syn queues over named dblink connections, transforms batches, writes local tables, and returns processing status to the source database.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100324 | sys_syn_dblink | sys_syn_dblink | 0.0.1 | ETL | PostgreSQL | SQL |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
Usage
Sources:
sys_syn_dblink is the receiving-side processor for sys_syn queues. It uses a named dblink connection to claim batches on a source database, pull changes, transform them, write local target tables, and push processing status back to the source.
Setup
Install sys_syn and configure its input/output queues on the source. On the receiving database, install the declared dependencies and this extension, open the named connection, define input/output/put groups, and generate a process table:
Optional rows in put_table_transforms and put_column_transforms change table/column mappings. Generated worker functions implement claim, pull, process, and status-push stages. The official guide requires repeated pull/process/push cycles because each call handles a limited batch; claim operations also use an explicit remote transaction.
Dependencies and Operations
The receiver requires hstore and dblink; the remote database requires sys_syn. Temporal and bitemporal table types additionally require the specified temporal_tables version or patch. The reviewed project documents PostgreSQL 9.5 or later, but version 0.0.1 uses extensive generated PL/pgSQL and old APIs, so verify the exact modern-server combination.
Keep the named dblink connection open in the session running generated procedures. Protect connection credentials and transformation definitions: they determine remote access and dynamically generated local SQL. Monitor held/retry states, bound batch sizes, serialize claims correctly, and test interrupted transactions so rows are not lost or processed twice. The catalog classifies this version as preview.