Re: libpq compression - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq compression
Date
Msg-id 5365.1339799869@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq compression  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq compression
List pgsql-hackers
I wrote:
> Euler Taveira <euler@timbira.com> writes:
>> I see the point in not adding another dependencies or reinventing the wheel
>> but I see more drawbacks than benefits in adopting a SSL-based compression.

> In the end, judging this tradeoff is a matter of opinion, but I come to
> the opposite conclusion.

BTW, there is an additional technical argument that I don't think has
been made yet.  Assume that we implement our own transport compression,
and then somebody runs an SSL connection using a recent OpenSSL version
(in which, IIRC, SSL-level compression is enabled by default).  Now,
OpenSSL is trying to compress already-compressed data.  That's not
merely a waste of cycles but is very likely to be counterproductive,
ie recompressed data usually gets larger not smaller.

We could possibly address this by adding control logic to tell OpenSSL
not to compress ... but that's almost exactly the code you don't want
to write, just making a different option selection.  And I wonder
whether SSL implementations that don't support compression will accept
a set-the-compression-option call at all.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Event Triggers reduced, v1
Next
From: Simon Riggs
Date:
Subject: Re: Streaming-only Remastering