pgpool2.git / summary / log / commit / refs
commit ab091663b09ef8c2d0a1841921597948c597444e
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Mon Nov 11 11:17:28 2024 +0000
Fix COPY hangs.
During COPY IN state (i.e. COPY FROM STDIN), frontend can send Flush
or Sync messages. According to the F/B protocol specification, they
should be ignored but Pgpool-II treated as an invalid message and this
causes COPY hung.
Discussion: https://github.com/pgpool/pgpool2/issues/79
Backpatch-through: v4.1
src/protocol/pool_proto_modules.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/protocol/pool_proto_modules.c b/src/protocol/pool_proto_modules.c
index 4988325dc..9aa0d7736 100644
--- a/src/protocol/pool_proto_modules.c
+++ b/src/protocol/pool_proto_modules.c
@@ -3398,6 +3398,12 @@ CopyDataRows(POOL_CONNECTION * frontend,
copy_count++;
continue;
}
+ /*
+ * Flush (H) or Sync (S) messages should be ignored while in
+ * the COPY IN mode.
+ */
+ else if (kind == 'H' || kind == 'S')
+ continue;
else
{
if (pool_config->log_client_messages && copy_count != 0)
[parent: 82d7132957fa]