Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 880672E2D74 for ; Fri, 7 Mar 2008 19:23:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 53304-03 for ; Fri, 7 Mar 2008 19:23:18 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 221AB2E2D62 for ; Fri, 7 Mar 2008 19:23:24 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m27NNC4p008566; Fri, 7 Mar 2008 18:23:12 -0500 (EST) To: Gregory Stark cc: pgsql-patches@postgresql.org, "Jan Wieck" Subject: Re: Proposed patch to change TOAST compression strategy In-reply-to: <87ir0mo8ot.fsf@oxford.xeocode.com> References: <26048.1203271939@sss.pgh.pa.us> <87ir0mo8ot.fsf@oxford.xeocode.com> Comments: In-reply-to Gregory Stark message dated "Mon, 18 Feb 2008 10:33:38 +0000" Date: Fri, 07 Mar 2008 18:23:12 -0500 Message-ID: <8565.1204932192@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/109 X-Sequence-Number: 5172 Gregory Stark writes: > "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. > I'll try some tests and see. On the strength of Teodor's favorable test, I went ahead and applied this patch as-is. We can certainly tweak the compressor logic again if you can show an improvement by changing it further. regards, tom lane