tencentdb_failover_slot
tencentdb_failover_slot · TencentDB proprietary kernel extension that synchronizes logical replication-slot state to standby nodes so subscriptions can continue across primary/standby failover.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101178 | tencentdb_failover_slot | tencentdb_failover_slot | 1.0 | ETL | Unknown | C |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 18
Usage
Sources:
tencentdb_failover_slot is the TencentDB for PostgreSQL provider extension for synchronizing logical replication-slot state to a standby so logical replication can continue after an HA switchover. It is a TencentDB kernel capability, not a portable community extension, and it supports logical slots only.
Create a Failover Slot
TencentDB creates logical slots as failover slots by default when the instance parameter tencentdb_force_enable_failover_slot is enabled:
If the default-forcing parameter is disabled, create one explicitly with pg_create_logical_failover_slot(slotname, pluginname). Tencent recommends pgoutput as the decoding plugin.
Lifecycle Operations
pg_create_logical_failover_slot()explicitly creates a failover logical slot.pg_failover_slotslists the names of current failover slots; join or querypg_replication_slotsfor the normal slot details.transform_slot_to_nonfailover()converts an inactive failover slot to a normal slot.pg_drop_replication_slot()drops either kind of slot.
Slots are instance-wide, while the extension is database-local. Create tencentdb_failover_slot again in another database before calling its functions there.
Failover Policy and Caveats
The TencentDB parameter failover_slot_timeline_diverged_option controls a case where standby WAL reception lags behind logical consumption during HA. Its default error pauses logical replication and reports an error for operator action. rewind resumes from the switchover point and can therefore imply a continuity/data-loss tradeoff; select it only with an application-level reconciliation plan.
Monitor retained WAL, slot activity, consumer LSNs, standby replay, and disk usage before and after failover. Test planned and unplanned switchovers with the real subscriber, confirm duplicate/gap handling, and remove abandoned slots promptly. Physical replication slots are not supported by this feature, and behavior, availability, permissions, backups, and upgrades remain subject to the TencentDB service and region.