Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5FE5C1337BED for ; Thu, 16 Dec 2010 06:13:12 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 75007-02-9 for ; Thu, 16 Dec 2010 10:13:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mail.postgresql.org (Postfix) with ESMTP id D36371337BC9 for ; Thu, 16 Dec 2010 06:12:56 -0400 (AST) Received: from [192.168.1.6] (static-71-179-240-8.bltmmd.fios.verizon.net [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0LoKJV-1Q4Bbz0nSD-00fywq; Thu, 16 Dec 2010 11:12:55 +0100 Message-ID: <4D09E624.4030706@2ndquadrant.com> Date: Thu, 16 Dec 2010 05:12:52 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Joachim Wieland CC: Heikki Linnakangas , 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:TA5MgRb2ZwvTgbUTIlaMVr68uQqPR9ps4fPKiHoFcsX sVaBjUh93gfHUAxaAStkebOASneOgVolSI4a4tv2ePlKuYLPMj VHu3HF8Z1BEEOOxeXclU7n6+eOa0vZu1kzdy/liTy+jRExliUO JxbUrj58SY/xoREKYI0WxxlZHRuMeR7KhXfMKWV/PVABkRzfY8 AcqN7xp6Qu6hiRzISP7BTQfX1mGUqQDI6Pc34PrTN0= 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/1398 X-Sequence-Number: 176660 Moving onto the directory archive part of this patch, the feature seems to work as advertised; here's a quick test case: createdb pgbench pgbench -i -s 1 pgbench pg_dump -F d -f test pg_restore -k test pg_restore -l test createdb copy pg_restore -d copy test The copy made that way looked good. There's a good chunk of code in the patch that revolves around BLOB support. We need to get someone who is more familiar with those than me to suggest some tests for that part before this gets committed. If you could suggest how to test that code, that would be helpful. There's a number of small things that I'd like to see improved in new rev of this code pg_dump: help message for "--file" needs to mention that this is overloaded to also specify the output directory too. pg_dump: the documentation for --file should say the directory is created, and must not exist when you start. The code catches this well, but that expectation is not clear until you try it. pg_restore: the help message "check the directory archive" would be clearer as "check an archive in directory format". There are some tab vs. space whitespace inconsistencies in the documentation added. The comments at the beginning of functions could be more consistent. Early parts of the code have a header for each function that's extensive. Maybe even a bit more than needed. I'm not sure why it's important to document here which of these functions is optional/mandatory for example, and getting rid of just those would trim a decent number of lines out of the patch. But then at the end, all of the new functions added aren't documented at all. Some of those are near trivial, but it would be better to have at least a small descriptive header for them. The comment header at the beginning of pg_backup_directory is a bit weird. I guess Philip Warner should still be credited as the author of the code this was based on, but it's a weird seeing a new file attributed solely to him. Also, there's an XXX in the identification field there that should be filled in with the file name. There's your feedback for this round. I hope we'll see an updated patch from you as part of the next CommitFest. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services and Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books