Error: Invalid Replication Slot Plugin
Issue
Setup tests fail. The following error appears:
Invalid replication slot decoding plugin
Environment
- Connector: PostgreSQL (including Amazon Aurora PostgreSQL, Amazon RDS PostgreSQL)
- Update method: Logical replication
Resolution
To resolve this issue, do the following:
Check which plugin your existing replication slot uses:
SELECT slot_name, plugin FROM pg_replication_slots WHERE slot_name = 'your_slot_name';Drop the replication slot:
SELECT pg_drop_replication_slot('your_slot_name');Recreate the replication slot using the
pgoutputplugin:SELECT pg_create_logical_replication_slot('your_slot_name', 'pgoutput');For more information, see the replication slot creation step in the PostgreSQL setup guide: configure incremental sync method.
Verify that the new slot uses the correct plugin:
SELECT slot_name, plugin FROM pg_replication_slots WHERE slot_name = 'your_slot_name';The
plugincolumn must returnpgoutput.Update the connection in Fivetran with the new slot details.
i. In Fivetran, go to your PostgreSQL connection page.
ii. Select the Setup tab.
iii. Click Edit connection.
iv. Update the Replication Slot and Publication Names fields with the new information.
v. Click Save & Test.
Trigger a historical sync to re-sync your data. A historical sync is required because the new replication slot starts tracking changes from the moment it is created. It does not continue from where the old slot left off.
Cause
The Fivetran PostgreSQL logical replication connector requires the replication slot to use the pgoutput decoding plugin.
This issue occurs when the replication slot uses a different plugin, most commonly test_decoding. When this happens, we reject the slot during the setup test that validates the slot configuration.
This mismatch occurs when:
- The slot was created manually using
test_decodingand was never updated. - The slot was recreated without explicitly specifying
pgoutput. - The slot was migrated from an older connection configuration that used
test_decoding.
If you previously used test_decoding and want to migrate to pgoutput, see Migrate My Logical Replication Connector From the test_decoding Plugin to the pgoutput Plugin.