Fix LZ4 tests for remaining buffer space.
authorRobert Haas <rhaas@postgresql.org>
Tue, 8 Mar 2022 15:05:55 +0000 (10:05 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 8 Mar 2022 15:05:55 +0000 (10:05 -0500)
commit1d4be6be65ab18aa3b240d9bc912ebece255c53b
tree17d985e81a6cc00845bc4c3eca0da540fe8e7026
parent7cf085f077df8dd9b80cf1f5964b5b8c142be496
Fix LZ4 tests for remaining buffer space.

We should flush the buffer when the remaining space is less than
the maximum amount that we might need, not when it is less than or
equal to the maximum amount we might need.

Jeevan Ladhe, per an observation from me.

Discussion: http://postgr.es/m/CANm22CgVMa85O1akgs+DOPE8NSrT1zbz5_vYfS83_r+6nCivLQ@mail.gmail.com
src/backend/replication/basebackup_lz4.c
src/bin/pg_basebackup/bbstreamer_lz4.c