Fix bug in replication mode and snapshot isolation mode.
authorTatsuo Ishii <ishii@postgresql.org>
Fri, 9 Aug 2024 10:55:05 +0000 (19:55 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Fri, 9 Aug 2024 10:55:05 +0000 (19:55 +0900)
commit181d300de6337fe9a10b60ddbd782aa886b563e9
tree0fb9211d5082fbbd459813fa22d2395e6a0c6732
parent744c96fedbeb03c827daa32e3a044ff88decb280
Fix bug in replication mode and snapshot isolation mode.

In replication mode and snapshot isolation mode when a command fishes,
pgpool waits for a ready for query message but forgot that some
commands (for example SET ROLE) produces a parameter status
message. As a result pgpool errors out that other message arrives
before the ready for query message.  Deal with the case when a
parameter status message arrives.

Here is the test case written in pgproto data format.

'P' "" "SET ROLE TO foo"
'B' "" "" 0 0 0
'E' "" 0
'P' "" "SELECT 1"
'B' "" "" 0 0 0
'E' "" 0
'S'
'Y'

Backpatch-through: v4.1.
src/protocol/pool_proto_modules.c