Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1DA3C1337B49 for ; Thu, 16 Dec 2010 14:45:59 -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 82167-02 for ; Thu, 16 Dec 2010 18:45:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mail.postgresql.org (Postfix) with SMTP id 28254133655C for ; Thu, 16 Dec 2010 14:45:51 -0400 (AST) Received: from source ([209.85.215.45]) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKTQpeXtyiwK+mVwLA6ttw51NFXhoop8mP@postini.com; Thu, 16 Dec 2010 10:45:51 PST Received: by ewy10 with SMTP id 10so2363781ewy.32 for ; Thu, 16 Dec 2010 10:45:50 -0800 (PST) Received: by 10.213.34.209 with SMTP id m17mr1659124ebd.30.1292525149090; Thu, 16 Dec 2010 10:45:49 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id u1sm2073182eeh.22.2010.12.16.10.45.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Dec 2010 10:45:48 -0800 (PST) Message-ID: <4D0A5E56.1080109@enterprisedb.com> Date: Thu, 16 Dec 2010 20:45:42 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: Joachim Wieland CC: Greg Smith , Tom Lane , =?ISO-8859-1?Q?Jos=E9_Arthur_Benetasso_Villanova?= , pgsql-hackers@postgresql.org Subject: Re: directory archive format for pg_dump References: <4CEA9F29.5060106@enterprisedb.com> <28890.1290445623@sss.pgh.pa.us> <4CEAD61A.6060207@enterprisedb.com> <4CF40B5F.1010407@enterprisedb.com> <4CF655A3.4090308@enterprisedb.com> <4CF6562E.60506@enterprisedb.com> <4CF74F99.4050008@enterprisedb.com> <4CF7F8FB.1040305@enterprisedb.com> <4D09E624.4030706@2ndquadrant.com> <4D0A2EFF.9020104@enterprisedb.com> <4D0A50D6.5070602@enterprisedb.com> In-Reply-To: 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=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201012/1467 X-Sequence-Number: 176729 On 16.12.2010 20:33, Joachim Wieland wrote: > On Thu, Dec 16, 2010 at 12:48 PM, Heikki Linnakangas > wrote: >> As soon as we have parallel pg_dump, the next big thing is going to be >> parallel dump of the same table using multiple processes. Perhaps we should >> prepare for that in the directory archive format, by allowing the data of a >> single table to be split into multiple files. That way parallel pg_dump is >> simple, you just split the table in chunks of roughly the same size, say >> 10GB each, and launch a process for each chunk, writing to a separate file. > > How exactly would you "just split the table in chunks of roughly the > same size" ? Check pg_class.relpages, and divide that evenly across the processes. That should be good enough. > Which queries should pg_dump send to the backend? If it > just sends a bunch of WHERE queries, the server would still scan the > same data several times since each pg_dump client would result in a > seqscan over the full table. Hmm, I was thinking of "SELECT * FROM table WHERE ctid BETWEEN ? AND ?", but we don't support TidScans for ranges. Perhaps we could add that. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com