diff options
author | Tatsuo Ishii | 2024-11-11 11:17:28 +0000 |
---|---|---|
committer | Tatsuo Ishii | 2024-11-11 11:17:28 +0000 |
commit | ab091663b09ef8c2d0a1841921597948c597444e (patch) | |
tree | 2aa053430df1a01415bc4a4cec8482788eb3de1f | |
parent | 82d7132957fadd6faf4de1a794b2974c389e0ed2 (diff) |
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
-rw-r--r-- | src/protocol/pool_proto_modules.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) |