Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 42B0E2C5251 for ; Sat, 16 Jun 2012 01:55:21 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sfl2e-0008Mo-2u for pgsql-hackers@postgresql.org; Sat, 16 Jun 2012 04:55:20 +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 q5G4t27K011358; Sat, 16 Jun 2012 00:55:02 -0400 (EDT) From: Tom Lane To: Magnus Hagander cc: Euler Taveira , Florian Pflug , Bruce Momjian , Pgsql Hackers Subject: Re: libpq compression In-reply-to: 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> <5365.1339799869@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Sat, 16 Jun 2012 11:43:50 +0800" Date: Sat, 16 Jun 2012 00:55:02 -0400 Message-ID: <11357.1339822502@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/776 X-Sequence-Number: 209616 Magnus Hagander writes: > Yes, but there's also a lot of such awkward logic we need to add if we > *do* go with the SSL library doing the compression: > For example, we can no longer trust the SSL library to always do > encryption, since we specifically want to support null encryption. True, but are you sure we don't need to do that anyway? What happens today, if a non-libpq client connects with SSL and specifies null encryption? > And we currently have no way to specify different > encryption options on a per-host basis, which is something we'd have > to do (e.g. i want to be able to say that "subnet x requires > encryption with these encryptions methods" and "subnet y doesn't > require encryption but should do compression". [ shrug... ] Having that sort of control over a homebrew compression solution will *also* require a lot of control logic that does not exist today. > So there's quite a bit of complexity that needs to be put in there > just to deal with the fact that we're using SSL to do compression, if > we want to support it in a way that's not hackish. It's not obvious to me that we actually *need* anything except the ability to recognize that a null-encrypted SSL connection probably shouldn't be treated as matching a hostssl line; which is not something that requires any fundamental rearrangements, since it only requires an after-the-fact check of what was selected. Things like "subnet x requires encryption with these encryption methods" are features that are sensible with our existing feature set. But we don't have that now and nobody has asked for it, so I think you are moving the goalposts rather unfairly by claiming that a compression-related patch needs to add it. regards, tom lane