Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>>> If that's a predictable deadlock, I think a minimum expectation is that
>>> the system should notice it and throw an error, not just hang.
> We had some discussions early on about detecting connections to the same
> server, but it's not entirely clear how to do that and it didn't seem
> worth it at the time.
I wonder whether we actually need to detect connections to the same
server per se. I'm thinking about the one end taking some special
heavyweight lock, and the other end taking the same lock, which would
generally be free as long as the two ends aren't on the same server.
Cascading replication might be a problem though ...
regards, tom lane