Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3C5956382E7; Tue, 2 Feb 2010 14:52:23 -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 10084-02-6; Tue, 2 Feb 2010 18:52: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 BB9A9632AEC; Tue, 2 Feb 2010 14:19:46 -0400 (AST) Received: by bwz10 with SMTP id 10so367932bwz.35 for ; Tue, 02 Feb 2010 10:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=l/3qhmy2cbWZYPbvVvXJLKL9HyorbpnVqUxuX0n94Gc=; b=tM4XQFHAx+QeNGtnSMipTrRoTXLlGWwzNcP00KdNPe/Owm9I72XV7vstv0Duyzz0QM EJNyPJDnxkBeoYKzrB75e37+7BOjWN2vemj75RuJ8abmA9CZa0Q/3zACqPHB+5XUPawl 2tWsTecg115Mw+D7jvfE4whvJET5gk3eLNBKQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=NSzwBqCDwNPwrjaIwbK+kGg40GoA299dcDGbA9fMsi0q4iVPopmYdNO2YU4xPwYu+g cPljBEXL0nFeT9qu0j4QSceBGgM4cz0Xry8Q1YwzYw0MPWn3C1lgPWtVZslm8jtgGKje Ef9kxJsbzEpUqpXUeon17B4tngARfeJ+5mAHY= MIME-Version: 1.0 Received: by 10.239.177.211 with SMTP id w19mr568460hbf.162.1265134480369; Tue, 02 Feb 2010 10:14:40 -0800 (PST) In-Reply-To: <23321.1265133015@sss.pgh.pa.us> References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <407d949e1001291056q22915b1cqbce5fbc918a15d69@mail.gmail.com> <603c8f071002020936k5723e30kd4eac594092aba3b@mail.gmail.com> <201002021843.49983.andres@anarazel.de> <23321.1265133015@sss.pgh.pa.us> Date: Tue, 2 Feb 2010 13:14:40 -0500 Message-ID: <603c8f071002021014h4b489f44s9014377e1b38dbc7@mail.gmail.com> Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb) From: Robert Haas To: Tom Lane Cc: Andres Freund , Greg Stark , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org, Michael Clemmons , Hannu Krosing , Scott Marlowe Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 201002/18 X-Sequence-Number: 37439 On Tue, Feb 2, 2010 at 12:50 PM, Tom Lane wrote: > Andres Freund writes: >> On Tuesday 02 February 2010 18:36:12 Robert Haas wrote: >>> I took a look at this patch today and I agree with Tom that >>> pg_fsync_start() is a very confusing name. =A0I don't know what the >>> right name is, but this doesn't fsync so I don't think it shuld have >>> fsync in the name. =A0Maybe something like pg_advise_abandon() or >>> pg_abandon_cache(). =A0The current name is really wishful thinking: >>> you're hoping that it will make the kernel start the fsync, but it >>> might not. =A0I think pg_start_data_flush() is similarly optimistic. > >> What about: pg_fsync_prepare(). > > prepare_for_fsync()? It still seems mis-descriptive to me. Couldn't the same routine be used simply to abandon undirtied data that we no longer care about caching? ...Robert