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 11:01:11 +0000 (20:01 +0900)
commite25f5d66d5e16317cb21e044c1cdf6e845829a35
tree0f21b55962ab530caaa8e49c6404732b3870bf70
parentf4be86f5c56828c9d9c4e227f5a6e540e00689db
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