pgjdbc/pgjdbc — pull request #178 by andrewfrolov (2014-08-11 13:47:54+00:00)
Title: Fix recovery function to return only xa transactions which belongs to current db

There is a problem with recover method of PGXAConnection. It returns XID's for all prepared transactions that exists in postgres cluster.
- But you can commit or rollback only those transactions, that belongs to current database.
- And there is no way to understand which XID belongs to what database.
- And the XA transaction managers, which call recover() and commit()/rollback() functions, according to the contract should recover only one database not the whole cluster. There is no reason why it should get not relevant XIDs from recover() call.

The fix would be to return only relevant transactions from recover() function.