Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A82626333A9; Wed, 3 Feb 2010 07:55:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 76741-03; Wed, 3 Feb 2010 11:55:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f218.google.com (mail-bw0-f218.google.com [209.85.218.218]) by mail.postgresql.org (Postfix) with ESMTP id 86DF763259D; Wed, 3 Feb 2010 07:55:18 -0400 (AST) Received: by bwz10 with SMTP id 10so1069188bwz.35 for ; Wed, 03 Feb 2010 03:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=Mrys7XFl83YQ6mwumdYCcCcz338z+6DQUlh/KVtN0Bs=; b=H/erqYWjFwtqlR68e5eO6szmqcNoj7gb510UXzNHJLv7gWmQsntDr1ymtpxxYAD54I DhX/FbAqU3SSKmBatkNMyBqXPJeRk9zRMjgZ2jTK+Mnrs8w0qHE8LSCvsthWv5qSrInX 0KnJdNNFvnXvEWE+0n5F8ebcTZPnTh9ZUGxUc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=N2LJUhHvIejcsWFovgirF7Hg44rHnggMDb7Rs7sGC/FW0D0vpKUYBRNNOKXTrjTmSj zj67H4bwKHnsoTI1mDYN6zdHqWcCV9wfnplcfVEjiLZ+eCRx2cATe1AJFsw0P0986yzN flj7GUH/zfAFpCZKJpYcAaI1EOWImdvaqFLUQ= MIME-Version: 1.0 Received: by 10.204.141.9 with SMTP id k9mr3346097bku.170.1265198116332; Wed, 03 Feb 2010 03:55:16 -0800 (PST) In-Reply-To: <603c8f071002021145x1939c9e7hb2eedc8ae4dfe23e@mail.gmail.com> References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <23321.1265133015@sss.pgh.pa.us> <603c8f071002021014h4b489f44s9014377e1b38dbc7@mail.gmail.com> <201002021934.18444.andres@anarazel.de> <603c8f071002021106o5eef7b40r1ed21c9bd05251ec@mail.gmail.com> <29129.1265139210@sss.pgh.pa.us> <603c8f071002021145x1939c9e7hb2eedc8ae4dfe23e@mail.gmail.com> From: Greg Stark Date: Wed, 3 Feb 2010 11:53:58 +0000 X-Google-Sender-Auth: cde31a1e2bd5389d Message-ID: <407d949e1002030353g522f1afev782a97fd755c5926@mail.gmail.com> Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb) To: Robert Haas Cc: Tom Lane , Andres Freund , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org, Michael Clemmons , Hannu Krosing , Scott Marlowe Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.497 tagged_above=-10 required=5 tests=AWL=0.102, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/52 X-Sequence-Number: 37473 On Tue, Feb 2, 2010 at 7:45 PM, Robert Haas wrote: > I think you're probably right, but it's not clear what the new name > should be until we have a comment explaining what the function is > responsible for. So I wrote some comments but wasn't going to repost the patch with the unchanged name without explanation... But I think you're right though I was looking at it the other way around. I want to have an API for a two-stage sync and of course if I do that I'll comment it to explain that clearly. The gist of the comments was that the function is preparing to fsync to initiate the i/o early and allow the later fsync to fast -- but also at the same time have the beneficial side-effect of avoiding cache poisoning. It's not clear that the two are necessarily linked though. Perhaps we need two separate apis, though it'll be hard to keep them separate on all platforms. -- greg