1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Revert "Fix corner case with PGP decompression in pgcrypto"

This reverts commit 9e10898, after finding out that buildfarm members
running SLES 15 on z390 complain on the compression and decompression
logic of the new test: pipistrelles, barbthroat and steamerduck.

Those hosts are visibly using hardware-specific changes to improve zlib
performance, requiring more investigation.

Thanks to Tom Lane for the discussion.

Discussion: https://postgr.es/m/20200722093749.GA2564@paquier.xyz
Backpatch-through: 9.5
This commit is contained in:
Michael Paquier
2020-07-23 08:29:18 +09:00
parent bba2e66aec
commit e30a63f258
3 changed files with 11 additions and 62 deletions

View File

@ -244,17 +244,6 @@ decompress_read(void *priv, PullFilter *src, int len,
struct DecomprData *dec = priv;
restart:
if (dec->stream.avail_in == 0)
{
uint8 *tmp;
res = pullf_read(src, 8192, &tmp);
if (res < 0)
return res;
dec->stream.next_in = tmp;
dec->stream.avail_in = res;
}
if (dec->buf_data > 0)
{
if (len > dec->buf_data)
@ -268,6 +257,17 @@ restart:
if (dec->eof)
return 0;
if (dec->stream.avail_in == 0)
{
uint8 *tmp;
res = pullf_read(src, 8192, &tmp);
if (res < 0)
return res;
dec->stream.next_in = tmp;
dec->stream.avail_in = res;
}
dec->stream.next_out = dec->buf;
dec->stream.avail_out = dec->buf_len;
dec->pos = dec->buf;