I have configured Logical replication between two Postgres Databases using pglogical.

I have a table that does not have a primary key on the target database. So I first delete all rows and then run the below command:

select pglogical.alter_subscription_resynchronize_table('gds_sandbox_uat_rds_pg10_subscriber','pgbench_history');

However, I delete the data again and this time add the primary key and try to rerun the resync but I run into the error:

ERROR:  table test_snadbox.pgbench_history is already being synchronized

However, the number of rows on the table is 0:

=> select count(*) from pgbench_history;



I have tried disabling and then enabling the replication, rerun the resync command multiple times, checked the logs but could not get rid of it.

Any suggestions or solutions?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.