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:19:15 +0000 (21:19 +0900)
commit3f1d420542569bfb4f55037e06bfe22ce3ae2f7b
tree99d65e92448289461da69429900367e85925d8bd
parente54457655c0b4107a8971c2688066594aecc490f
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.
pool_proto_modules.c