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

Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-committers(at)postgresql(dot)org, Greg Stark <stark(at)postgresql(dot)org>
Subject: Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after
Date: 2010-02-22 10:15:18
Message-ID: 407d949e1002220215l6fe8816al6703a5dc79e24894@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
On Mon, Feb 22, 2010 at 2:54 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Actually, that code had *multiple* problems including stat'ing the wrong
> file entirely, not to mention that this last commit failed to even
> compile.  I also think it should scan the todir not the fromdir, just on
> general principles to avoid any possibility of race conditions.

Argh. I'll be less careless in the future, I promise.

I had concluded that scanning the original directory was odd but
better because it served to double-check that all the original files
actually made it and also because if there were any unrelated files
present there was no need to fsync them. But I agree it's odd and not
very general for copydir if we decide to use it elsewhere other than
create database.




-- 
greg

In response to

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2010-02-22 10:29:54
Subject: Re: A thought on Index Organized Tables
Previous:From: Simon RiggsDate: 2010-02-22 09:17:45
Subject: Re: scheduler in core

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-02-22 11:47:30
Subject: pgsql: Move documentation of all recovery.conf option to a new chapter.
Previous:From: Andres FreundDate: 2010-02-22 07:59:36
Subject: Re: [COMMITTERS] pgsql: Oops, don't forget to rewind the directory before scanning it to

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