Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 14EA72E0090 for ; Thu, 21 Feb 2008 01:18:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14416-08 for ; Thu, 21 Feb 2008 01:18:18 -0400 (AST) Received: from n27.bullet.mail.mud.yahoo.com (n27.bullet.mail.mud.yahoo.com [68.142.200.142]) by postgresql.org (Postfix) with SMTP id BCB7F2E008C for ; Thu, 21 Feb 2008 01:18:18 -0400 (AST) Received: from [209.191.108.96] by n27.bullet.mail.mud.yahoo.com with NNFMP; 21 Feb 2008 05:06:27 -0000 Received: from [68.142.201.66] by t3.bullet.mud.yahoo.com with NNFMP; 21 Feb 2008 05:06:27 -0000 Received: from [127.0.0.1] by omp418.mail.mud.yahoo.com with NNFMP; 21 Feb 2008 05:06:23 -0000 X-Yahoo-Newman-Id: 367549.87644.bm@omp418.mail.mud.yahoo.com Received: (qmail 77244 invoked from network); 20 Feb 2008 21:15:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=Yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=lxODyh7e//F/n5qW8hRX82kDw633tmgRULS/jx9sCDgtsu9W4QnZZ0SHQa6UNrmSweqga/qX53Hq0Dvx1ZT1O+uTrokbfBzb8kmdv2ywDYikd3m9OGw8KHC2PAc22mh3oPTQbT+imUfMvegLzyM5yAQsEtp9L7ed5ClT3mmjdU4= ; Received: from unknown (HELO jupiter.jannicash.info) (janwieck@68.34.254.79 with login) by smtp125.plus.mail.mud.yahoo.com with SMTP; 20 Feb 2008 21:15:05 -0000 X-YMail-OSG: wI88Tg0VM1l.DrSLG12R1LKwXjwTNkqpBYJmqZNw7ti4Zrv5JqaG.ADHW66h8_coi4NeN9YYUg-- X-Yahoo-Newman-Property: ymail-3 Received: from [172.21.8.128] ([192.168.192.102]) (authenticated bits=0) by jupiter.jannicash.info (8.12.10/8.12.9) with ESMTP id m1KLF3cP020716; Wed, 20 Feb 2008 16:15:03 -0500 (EST) (envelope-from JanWieck@Yahoo.com) Message-ID: <47BC9852.9010100@Yahoo.com> Date: Wed, 20 Feb 2008 16:14:58 -0500 From: Jan Wieck User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Gregory Stark CC: Tom Lane , pgsql-patches@postgreSQL.org Subject: Re: Proposed patch to change TOAST compression strategy References: <26048.1203271939@sss.pgh.pa.us> <87ir0mo8ot.fsf@oxford.xeocode.com> In-Reply-To: <87ir0mo8ot.fsf@oxford.xeocode.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/72 X-Sequence-Number: 4924 On 2/18/2008 5:33 AM, Gregory Stark wrote: > "Tom Lane" writes: > >> * Adds an early-failure path to the compressor as suggested by Jan: >> if it's been unable to find even one compressible substring in the >> first 1KB (parameterizable), assume we're looking at incompressible >> input and give up. (There are various ways this could be done, but >> this way seems to add the least overhead to the compressor's inner >> loop.) > > I'm not sure how to test the rest of it, but this bit seems testable. I fear > this may be too conservative. Even nigh incompressible data will find a few > backreferences. One could argue that storing JPEG in a bytea column and not configuring the column to skip compression is a pilot error. But I guess this happens much more often than accidentally finding some data that has zero backref within the first KB and changes pattern thereafter. Do you have any example for data that is like that? Jan -- Anyone who trades liberty for security deserves neither liberty nor security. -- Benjamin Franklin