Fix Describe() so that it does not abort with portal created by DECLARE.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 28 Sep 2023 22:29:28 +0000 (07:29 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Thu, 28 Sep 2023 22:29:28 +0000 (07:29 +0900)
commite84fe9e5a8d93b7b0e347ee2c7d03a26d2dd7296
tree327730eb0127fa63c910ff8e5f6c4a126d5ee8c1
parentbce1eaa6419dbf8737e68c65c16fce3eadfc3e97
Fix Describe() so that it does not abort with portal created by DECLARE.

When DECLARE foo CURSOR FOR is executed, a portal named "foo" is
automatically created by PostgreSQL. As the portal is not managed by
Pgpool-II, "Describe foo" message failed with "unable to execute
Describe. unable to get the bind message" error.

To fix this, make Describe() creates a dummy write query context so
that the describe message is sent to primary (streaming replication
mode) or all nodes (replication/snapshot isolation mode).

Problem analysis by Heather Lapointe.
Discussion: https://www.pgpool.net/pipermail/pgpool-general/2023-September/008995.html
src/protocol/pool_proto_modules.c