Skip to content

Commit

Permalink
Fix COPY hangs.
Browse files Browse the repository at this point in the history
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: #79
Backpatch-through: v4.1
  • Loading branch information
tatsuo-ishii committed Nov 11, 2024
1 parent a34244b commit e99a704
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/protocol/pool_proto_modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -3397,6 +3397,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)
Expand Down

0 comments on commit e99a704

Please sign in to comment.