am writing to seek assistance regarding an issue I encountered while attempting to set up logical replication and decoding on GCP PostgreSQL, following the instructions provided in the documentation at https://cloud.google.com/sql/docs/postgres/replication/configure-logical-replication.
During the setup process, I encountered the following error message:
" db=db_b,user=[unknown] ERROR: subscriber test_sub initialization failed during non-recoverable step (d), please try the setup again"
I have followed the instructions carefully, but I am unable to proceed due to this error. I have reviewed the documentation and troubleshooting steps provided, but I have not been able to find a solution to this particular issue.
Could you please provide guidance on how to resolve this error and successfully set up logical replication and decoding? Any additional insights or recommendations would be greatly appreciated.
Solved! Go to Solution.
The error "subscriber test_sub initialization failed during non-recoverable step (d)" typically indicates a problem during the initial synchronization phase of the replication setup. This step involves creating a consistent snapshot of the source database to be transferred to the subscriber. Here are some steps you can take to troubleshoot and resolve this error:
Network Connectivity:
Replication User Permissions:
LOGIN
privilege on both the source and subscriber instances.REPLICATION
role on the source instance.pglogical Extension:
SELECT * FROM pg_extension WHERE extname = 'pglogical';
.Resource Constraints:
Conflicting Objects:
pglogical.replication_set_remove_table()
function.Troubleshooting Steps
Fixing Replication User Permissions
-- On the source instance
GRANT pg_read_all_data TO your_replication_user;
-- On the subscriber instance
GRANT pg_write_all_data TO your_replication_user;
If the problem persists, reach out to Google Cloud Support for assistance. They can access detailed logs and provide expert help.
The error "subscriber test_sub initialization failed during non-recoverable step (d)" typically indicates a problem during the initial synchronization phase of the replication setup. This step involves creating a consistent snapshot of the source database to be transferred to the subscriber. Here are some steps you can take to troubleshoot and resolve this error:
Network Connectivity:
Replication User Permissions:
LOGIN
privilege on both the source and subscriber instances.REPLICATION
role on the source instance.pglogical Extension:
SELECT * FROM pg_extension WHERE extname = 'pglogical';
.Resource Constraints:
Conflicting Objects:
pglogical.replication_set_remove_table()
function.Troubleshooting Steps
Fixing Replication User Permissions
-- On the source instance
GRANT pg_read_all_data TO your_replication_user;
-- On the subscriber instance
GRANT pg_write_all_data TO your_replication_user;
If the problem persists, reach out to Google Cloud Support for assistance. They can access detailed logs and provide expert help.
Thank you for your support. I successfully resolved the issue based on your suggestion.