Remove pending message when Close Complete received.
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 3 Sep 2017 06:21:34 +0000 (15:21 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 3 Sep 2017 06:21:34 +0000 (15:21 +0900)
commit9444f0cc3b131be2faf87e868d249ebf0bc882f5
tree9b0ccb83ed0bd8fcfcb811c7d2d61442e9a6dd80
parent6b4216d429c4baef294d7b848eca90d406abc49e
Remove pending message when Close Complete received.

When parse_before_bind() is called and a close message is sent, a
pending message is created but it is not removed later on. For usual
close message read_kind_from_backend() does not remove the pending
message because CloseComplete() does it later on. But in the code path
for parse_before_bind() gets called, CloseComplete() did not remove
the pending message. This brings loosing sync of pending messages and
messages from backend, which could cause a hang in
read_kind_from_backend().
src/protocol/pool_proto_modules.c