Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after - Mailing list pgsql-committers

From Greg Stark
Subject Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after
Date
Msg-id 407d949e1002220215l6fe8816al6703a5dc79e24894@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Mon, Feb 22, 2010 at 2:54 AM, Tom Lane <tgl@sss.pgh.pa.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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after
Next
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: Move documentation of all recovery.conf option to a new chapter.