From: Greg Stark <gsstark@mit.edu>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Date: Sun, 14 Feb 2010 15:31:58 +0000
Message-ID: <407d949e1002140731j85a4f97nc053ec1b0f3cc458@mail.gmail.com> (raw)
In-Reply-To: <407d949e1002140603v1c7515d7t697568a3865ac6fe@mail.gmail.com>
References: <4427a97a0912101235x3ade510blcc00d5ce9883c6b6@mail.gmail.com>
<20100208030901.GA7407@alvh.no-ip.org>
<603c8f071002072053w16897addtd52fcc4cf880df53@mail.gmail.com>
<201002110327.35810.andres@anarazel.de>
<603c8f071002120749o6a2e9e54h5cf21dc91d1790b9@mail.gmail.com>
<407d949e1002140603v1c7515d7t697568a3865ac6fe@mail.gmail.com>
On Sun, Feb 14, 2010 at 2:03 PM, Greg Stark <gsstark@mit.edu> wrote:
> On Fri, Feb 12, 2010 at 3:49 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Greg Stark, have you managed to get your access issues sorted out? If
>
> Yep, will look at this today.
So I think we have a bigger problem than just copydir.c. It seems to
me we should be fsyncing the table space data directories on every
checkpoint. Otherwise any newly created relations or removed relations
could disappear even though the data in them was fsynced. I'm thinking
I should add an _mdfd_opentblspc(reln) call which returns a file
descriptor for the tablespace and have mdsync() use that to sync the
directory whenever it fsyncs a relation. It would be nice to remember
which tablespaces have been fsynced and only fsync them once though,
that would need another hash table just for tablespaces.
We probably also need to fsync the pg_xlog directory every time we
create or rename an xlog segment.
Are there any other places we do directory operations which we need to
be permanent?
--
greg
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gsstark@mit.edu, robertmhaas@gmail.com, andres@anarazel.de, pgsql-hackers@postgresql.org
Subject: Re: Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
In-Reply-To: <407d949e1002140731j85a4f97nc053ec1b0f3cc458@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