Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using slony1-2.0.4.rc2 and postgresql-8.4.0-0. I faced a deadlock in the slony uninstall process.

I was trying to uninstall node from a cluster, as per slony's documents this requires access exclusive locks on all replicated tables. When the slony process was uninstalling the cluster, at the same time the application inserted a row in one of the replicated tables which I think resulted in a dead lock:

This question came from our site for professional and enthusiast programmers.

My first instinct would be to disable the application during this process... Or perhaps you can make slony lock more aggressively to prevent the application from gaining locks?
–
Frank FarmerJan 19 '12 at 20:32

Thanks Frank. But I am doing this on a HA setup and application is entering data in secondary DB and I can not disable that
–
user1159389Jan 19 '12 at 20:39

Are you unable to remove it from the HA cluster before uninstalling slony?
–
IlionJan 20 '12 at 5:14

Yes, while dropping the node I get the deadlock
–
user1159389Jan 20 '12 at 17:03

2 Answers
2

I suspect you are going to have to disable application access during the uninstall process. The basic problem is that Slony uses large numbers of triggers to maintain the binary logs for shipping. These triggers are going to be hard to delete while there is concurrent access.