Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AB8D9632AC0 for ; Tue, 19 Jan 2010 11:26:05 -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 63155-08 for ; Tue, 19 Jan 2010 15:25:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id F1824634535 for ; Tue, 19 Jan 2010 11:25:54 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o0JFPkJ3009320; Tue, 19 Jan 2010 10:25:46 -0500 (EST) To: Greg Stark cc: Andres Freund , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org, Michael Clemmons , Hannu Krosing , Scott Marlowe Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb) In-reply-to: <407d949e1001190652i43f4f276x6a485f375647219a@mail.gmail.com> References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com> <200912282354.51892.andres@anarazel.de> <200912282359.43979.andres@anarazel.de> <200912291930.50812.andres@anarazel.de> <407d949e1001180835m79ffe3e4w53e20ce2e1a58f2d@mail.gmail.com> <407d949e1001190652i43f4f276x6a485f375647219a@mail.gmail.com> Comments: In-reply-to Greg Stark message dated "Tue, 19 Jan 2010 14:52:25 +0000" Date: Tue, 19 Jan 2010 10:25:46 -0500 Message-ID: <9319.1263914746@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.458 tagged_above=-10 required=5 tests=AWL=0.141, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/403 X-Sequence-Number: 37283 Greg Stark writes: > 1) moved the posix_fadvise call to a new fd.c function > pg_fsync_start(fd,offset,nbytes) which initiates an fsync without > waiting on it. Currently it's only implemented with > posix_fadvise(DONT_NEED) but I want to look into using sync_file_range > in the future -- it looks like this call might be good enough for our > checkpoints. That function *seriously* needs documentation, in particular the fact that it's a no-op on machines without the right kernel call. The name you've chosen is very bad for those semantics. I'd pick something else myself. Maybe "pg_start_data_flush" or something like that? Other than that quibble it seems basically sane. regards, tom lane