Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 37FE61337B89 for ; Mon, 22 Nov 2010 12:50:02 -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 27187-02 for ; Mon, 22 Nov 2010 16:49:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og113.obsmtp.com (exprod7og113.obsmtp.com [64.18.2.179]) by mail.postgresql.org (Postfix) with SMTP id E4FFF1337B7F for ; Mon, 22 Nov 2010 12:49:49 -0400 (AST) Received: from source ([209.85.215.175]) by exprod7ob113.postini.com ([64.18.6.12]) with SMTP ID DSNKTOqfLJsu2kXX45sqShzCMpStARglcrGf@postini.com; Mon, 22 Nov 2010 08:49:50 PST Received: by mail-ey0-f175.google.com with SMTP id 28so3915224eya.20 for ; Mon, 22 Nov 2010 08:49:48 -0800 (PST) Received: by 10.213.4.12 with SMTP id 12mr8197927ebp.39.1290444587885; Mon, 22 Nov 2010 08:49:47 -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 w20sm4854424eeh.12.2010.11.22.08.49.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 22 Nov 2010 08:49:46 -0800 (PST) Message-ID: <4CEA9F29.5060106@enterprisedb.com> Date: Mon, 22 Nov 2010 18:49:45 +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: =?ISO-8859-1?Q?Jos=E9_Arthur_Benetasso_Villanova?= , pgsql-hackers@postgresql.org Subject: Re: directory archive format for pg_dump References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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: 201011/1451 X-Sequence-Number: 174594 On 20.11.2010 06:10, Joachim Wieland wrote: > 2010/11/19 José Arthur Benetasso Villanova: >> The md5.c and kwlookup.c reuse using a link doesn't look nice either. >> This way you need to compile twice, among others things, but I think >> that its temporary, right? > > No, it isn't. md5.c is used in the same way by e.g. libpq and there > are other examples for links in core, check out src/bin/psql for > example. It seems like overkill to include md5 just for hashing the random bytes that getRandomData() generates. And if random() doesn't produce unique values, it's not going to get better by hashing it. How about using a timestamp instead of the hash? If you don't initialize random() with srandom(), BTW, it will always return the same value. But I'm not actually sure we should be preventing mix & match of files from different dumps. It might be very useful to do just that sometimes, like restoring a recent backup, with the contents of one table replaced with older data. A warning would be ok, though. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com