ERROR: cannot execute DELETE in a read-only transactionI kept getting errors like that but I didn't think anything had changed with my company's PostgreSQL installation. It turned out that there was a VIP that got applied to a secondary server (slave perhaps, made it a duplicate VIP) so nine times out of ten I was hitting the wrong server. I hope this helps somebody in the future since I found no help on Google ......