Fix returning transaction state when "ready for query" message received.
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 10 Dec 2017 12:04:15 +0000 (21:04 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 10 Dec 2017 12:18:24 +0000 (21:18 +0900)
commit38091cf9c7366f4a87d59830a19fa17b37dcd653
tree31819090a0b2cb3d98495d4307d9d5cde8c40409
parent33920145b3f4a0352efd3776ba1748e263185870
Fix returning transaction state when "ready for query" message received.

We return primary or master node state of ready for query message to
frontend. In most cases this is good. However if other than primary
node or master node returns an error state (this could happen if load
balance node is other than primary or master node and the query is an
errornous SELECT), this should be returned to frontend, because the
frontend already received an error.

How much this affects to applications is not clear. However this
behavior has been there for long time, probably applications do not
care the state returned by ready for query message.
src/protocol/pool_proto_modules.c