Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EE4E81337B49 for ; Thu, 9 Dec 2010 12:01:50 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 77265-09 for ; Thu, 9 Dec 2010 16:01:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.120]) by mail.postgresql.org (Postfix) with ESMTP id AD8D91337B2F for ; Thu, 9 Dec 2010 12:01:43 -0400 (AST) X-Authority-Analysis: v=1.1 cv=uESSSoDEku2quKX/oFXS2Smn5+55LTFcWFr5T5T8nFs= c=1 sm=0 a=iaPMGmxhcS8A:10 a=8nJEP1OIZ-IA:10 a=qCTYjJJ2g1SgQhsHZAUATw==:17 a=c1bdqjGwkAy8TqtqLdIA:9 a=btsSO8NRs09Hk0GfJYLLFYHRgUQA:4 a=wPNLvfGTeEIA:10 a=qCTYjJJ2g1SgQhsHZAUATw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.27.48.207 Received: from [98.27.48.207] ([98.27.48.207:34539] helo=[192.168.10.104]) by cdptpa-oedge01.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 04/62-07087-56DF00D4; Thu, 09 Dec 2010 16:01:42 +0000 Message-ID: <4D00FD65.1020501@dunslane.net> Date: Thu, 09 Dec 2010 11:01:41 -0500 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.6 MIME-Version: 1.0 To: Tom Lane CC: pgsql-hackers@postgreSQL.org Subject: Re: [PERFORM] Slow BLOBs restoring References: <4CFDF22B.7060209@dc.baikal.ru> <4CFF46BD.8070004@dc.baikal.ru> <14439.1291819581@sss.pgh.pa.us> <4D00559C.6070009@dc.baikal.ru> <29435.1291872532@sss.pgh.pa.us> <6530.1291907115@sss.pgh.pa.us> In-Reply-To: <6530.1291907115@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201012/704 X-Sequence-Number: 175966 On 12/09/2010 10:05 AM, Tom Lane wrote: > I think what we need to do is make fix_dependencies > build a reverse lookup list of all the objects dependent on each TOC > object, so that the searching behavior in reduce_dependencies can be > eliminated outright. That will take O(N) time and O(N) extra space, > which is a good tradeoff because you won't care if N is small, while if > N is large you have got to have it anyway. > > Barring objections, I will do this and back-patch into 9.0. There is > maybe some case for trying to fix 8.4 as well, but since 8.4 didn't > make a separate TOC entry for each blob, it isn't as exposed to the > problem. We didn't back-patch the last round of efficiency hacks in > this area, so I'm thinking it's not necessary here either. Comments? > > Sound good. Re 8.4: at a pinch people could probably use the 9.0 pg_restore with their 8.4 dump. cheers andrew