I have installed 2nd Quadrant PostgreSQL BDR version 1.0.2-2017-10-31- in three AWS nodes in different regions for Active-Active replication. Replication has worked fine as when I imported data in database of one node it replicated to other node.
But, at the time of issuing any DDL in the database of the BDR group it is showing error :
ERROR: database is locked against ddl by another node
HINT: Node (6489370455887834827,1,16387) in the cluster is already performing DDL
Although there is no application is pointing to the database and no activity is performing on it.
Please help.
Regards Debasish
When this happens, I find the only option left to me is to forcibly remove BDR from local node by running:
However, if this is a POSTGIS-enabled database, even that will fail, with a message like this:
You will then try to drop extension postgis...
And you will again get:
So, if you find yourself in this catch-22 situation, run the following script. It will completely remove BDR from the local node, allowing you to continue with the DDL commands. This will of course break replication, but you will be able to rejoin the node under a new name afterwards.
Don't forget to change the name of the database in line 4.