Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E21E8EF2B69 for ; Sat, 16 Jun 2012 01:08:05 -0300 (ADT) Received: from oproxy7-pub.bluehost.com ([67.222.55.9]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1SfkIu-0007dQ-Ik for pgsql-hackers@postgresql.org; Sat, 16 Jun 2012 04:08:05 +0000 Received: (qmail 27165 invoked by uid 0); 16 Jun 2012 04:07:50 -0000 Received: from unknown (HELO host159.hostmonster.com) (74.220.207.159) by oproxy7.bluehost.com with SMTP; 16 Jun 2012 04:07:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=timbira.com; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=yCA6tEkD1Mem0IxVmGxvLf5zJDDISK2AfGrmm9gjJCc=; b=f7mAIEZ2Ffr0cV4KXy7PXYIM/CfdgRVkkErJJJOh0U1kBtNFhfjhUc4cwAXdmxhF8DZuRVLeas5HMJ0Xrp8II2KSei2cP6oilH/hLHv1PhRH2KjyW8uAry/BCj/5Ahgz; Received: from [189.10.72.105] (port=62450 helo=[10.3.2.3]) by host159.hostmonster.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1SfkIg-0001Li-0y; Fri, 15 Jun 2012 22:07:50 -0600 Message-ID: <4FDC05B6.9010301@timbira.com> Date: Sat, 16 Jun 2012 01:04:06 -0300 From: Euler Taveira User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4 MIME-Version: 1.0 To: Magnus Hagander CC: Tom Lane , Florian Pflug , Bruce Momjian , Pgsql Hackers Subject: Re: libpq compression 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> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Identified-User: {1651:host159.hostmonster.com:timbirac:timbira.com} {sentby:smtp auth 189.10.72.105 authed with euler@timbira.com} X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201206/772 X-Sequence-Number: 209612 On 16-06-2012 00:43, Magnus Hagander wrote: > For example, we can no longer trust the SSL library to always do > encryption, since we specifically want to support null encryption. > Meaning we need to teach pg_hba to treat a connection with null > encryption as hostnossl, even if it's an openssl-backed connection, > and mirrored. And in libpq, we have to make sure that a requiressl > connection *does* fail even if we have ssl, when we're using 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". Which in the easiest > first look would require ssl_ciphers to be controllable from > pg_hba.conf - but that doesn't work since we don't get to pg_hba.conf > until after we've negotiated the SSL mode... > > 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. > That's exactly the complexity I wouldn't add to the code. I'm in favor of experimenting an standard algorithm (zlib, for example -- let's say, it is the easiest way to implement it) or even hooks (libpq and backend -- that seems to be complex but less than openssl-backed connection just for compression). -- Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento