pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Greg Stark <gsstark@mit.edu>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org, Michael Clemmons <glassresistor@gmail.com>
Cc: Hannu Krosing <hannu@2ndquadrant.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Date: Wed, 3 Feb 2010 08:42:57 -0500
Message-ID: <603c8f071002030542r779a4f47k78355c62b0b7853@mail.gmail.com> (raw)
In-Reply-To: <407d949e1002030353g522f1afev782a97fd755c5926@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>
	<407d949e1002030353g522f1afev782a97fd755c5926@mail.gmail.com>

On Wed, Feb 3, 2010 at 6:53 AM, Greg Stark <gsstark@mit.edu> wrote:
> On Tue, Feb 2, 2010 at 7:45 PM, Robert Haas <robertmhaas@gmail.com> 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.

Well, maybe we should start with a discussion of what kernel calls
you're aware of on different platforms and then we could try to put an
API around it.  I mean, right now all you've got is
POSIX_FADV_DONTNEED, so given just that I feel like the API could
simply be pg_dontneed() or something.  It's hard to design a general
framework based on one example.

...Robert



view thread (40+ messages)  latest in thread

Message-ID: <603c8f071002030542r779a4f47k78355c62b0b7853@mail.gmail.com>
Permalink:  ../603c8f071002030542r779a4f47k78355c62b0b7853@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f071002030542r779a4f47k78355c62b0b7853@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, gsstark@mit.edu, tgl@sss.pgh.pa.us, andres@anarazel.de, glassresistor@gmail.com, hannu@2ndquadrant.com, scott.marlowe@gmail.com
  Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
  In-Reply-To: <603c8f071002030542r779a4f47k78355c62b0b7853@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> <407d949e1002030353g522f1afev782a97fd755c5926@mail.gmail.com> <603c8f071002030542r779a4f47k78355c62b0b7853@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox