Migrating a WAL Connector Using the test_decoding
Plugin to the pgoutput
Plugin
Question
How do I migrate my logical replication connector from the test_decoding
plugin to the pgoutput
plugin?
Environment
Connector: PostgreSQL
Answer
We are deprecating the test_decoding
update method and migrating all customers to the pgoutput
update method. Pgoutput
is PostgreSQL’s native decoding plugin for V10+.
Follow the steps below to migrate from test_decoding
to pgoutput
without needing to perform a historical re-sync:
IMPORTANT: Make sure that you create the publication before you create the replication slot. Doing them in the opposite order results in errors reading from the slot and consequently a historical re-sync. Learn how to create a publication and logical replication slot with the
pgoutput
plugin in the Configure incremental sync method step in your PostgreSQL connector's setup guide.
- Create a publication in your source.
- Create a
pgoutput
slot in your source. - Pause the connector.
- In the connector setup form, change the Update Method to Logical Replication.
- Add the publication name and
pgoutput
slot in the setup form. - Click Save and Test.
- Unpause the connector.
You do not need to re-sync your connector, since we automatically perform the migration for you. You will not incur any additional costs. Keep the following test_decoding
slot in the database because we need it for the migration. Once the migration is complete, we will display a warning on the dashboard that prompts you to safely drop the original slot. If you keep the slot in your source database, then the WAL will keep growing, consume your remaining disk space, and risk crashing your database.