Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 47A47632CE0; Wed, 20 Jan 2010 00:02:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49620-06; Wed, 20 Jan 2010 04:01:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id 6228063360F; Wed, 20 Jan 2010 00:01:59 -0400 (AST) Received: from alap2.localnet (e178208094.adsl.alicedsl.de [85.178.208.94]) by mail.anarazel.de (Postfix) with ESMTPSA id EBA20448005; Wed, 20 Jan 2010 05:01:56 +0100 (CET) From: Andres Freund To: pgsql-performance@postgresql.org Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb) Date: Wed, 20 Jan 2010 05:01:55 +0100 User-Agent: KMail/1.13.0 (Linux/2.6.33-rc3-andres-00151-gfd6fedc; KDE/4.3.90; x86_64; ; ) Cc: Greg Stark , pgsql-hackers@postgresql.org, Michael Clemmons , Hannu Krosing , Scott Marlowe References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <200912291930.50812.andres@anarazel.de> <407d949e1001180835m79ffe3e4w53e20ce2e1a58f2d@mail.gmail.com> In-Reply-To: <407d949e1001180835m79ffe3e4w53e20ce2e1a58f2d@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201001200501.55902.andres@anarazel.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/415 X-Sequence-Number: 37295 Hi Greg, On Monday 18 January 2010 17:35:59 Greg Stark wrote: > 2) Why does the second pass to do the fsyncs read through fromdir to > find all the filenames. I find that odd and counterintuitive. It would > be much more natural to just loop through the files in the new > directory. But I suppose it serves as an added paranoia check that the > files are in fact still there and we're not fsyncing any files we > didn't just copy. I think it should still work, we should have an > exclusive lock on the template database so there really ought to be no > differences between the directory trees. If it weren't safe we would already have a big problem.... Andres