Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org, Michael Clemmons <glassresistor(at)gmail(dot)com>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Date: 2010-01-19 15:25:46
Message-ID: 9319.1263914746@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Greg Stark <gsstark(at)mit(dot)edu> 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

In response to

Responses

pgsql-performance by date

Next:From: Ivan VorasDate: 2010-01-19 15:36:59
Subject: Re: Inserting 8MB bytea: just 25% of disk perf used?
Previous:From: Kevin GrittnerDate: 2010-01-19 15:13:51
Subject: Re: Inserting 8MB bytea: just 25% of disk perf used?

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2010-01-19 15:44:11
Subject: Re: Git out of sync vs. CVS
Previous:From: Magnus HaganderDate: 2010-01-19 15:19:58
Subject: Re: RADIUS authentication

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group