Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 86647CE6EC for ; Fri, 15 Jun 2012 19:38:07 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sff9a-0002kg-Mn for pgsql-hackers@postgresql.org; Fri, 15 Jun 2012 22:38:07 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q5FMbnkK005366; Fri, 15 Jun 2012 18:37:49 -0400 (EDT) From: Tom Lane To: Euler Taveira cc: Magnus Hagander , Florian Pflug , Bruce Momjian , Pgsql Hackers Subject: Re: libpq compression In-reply-to: <5136.1339799120@sss.pgh.pa.us> References: <4FD9698F.2090407@timbira.com> <29853.1339651170@sss.pgh.pa.us> <4FD9E70B.9040607@timbira.com> <11502.1339699384@sss.pgh.pa.us> <20120615021938.GA21704@momjian.us> <22690C61-E960-4A2A-BFD5-DAD3D3B5C474@phlo.org> <4FDB954F.9010606@timbira.com> <5136.1339799120@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 15 Jun 2012 18:25:20 -0400" Date: Fri, 15 Jun 2012 18:37:49 -0400 Message-ID: <5365.1339799869@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/756 X-Sequence-Number: 209596 I wrote: > Euler Taveira 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