Re: [GENERAL] Performance while loading data and indexing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Performance while loading data and indexing
Date
Msg-id 20359.1033096064@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Performance while loading data and indexing  (Doug McNaught <doug@wireboard.com>)
List pgsql-hackers
Doug McNaught <doug@wireboard.com> writes:
> "data=writeback" means that no data is journaled, just metadata (which
> is like XFS or Reiser).  An fsync() call should still do what it
> normally does, commit the writes to disk before returning.
> "data=journal" journals all data and is the slowest and safest.
> "data=ordered" writes out data blocks before committing a journal
> transaction, which is faster than full data journaling (since data
> doesn't get written twice) and almost as safe.  "data=writeback" is
> noted to keep obsolete data in the case of some crashes (since the
> data may not have been written yet) but a completed fsync() should
> ensure that the data is valid.

Thanks for the explanation.

> So I guess I'd probably use data=ordered for an all-on-one-fs
> installation, and data=writeback for a WAL-only drive.

Actually I think the ideal thing for Postgres would be data=writeback
for both data and WAL drives.  We can handle loss of un-fsync'd data
for ourselves in both cases.

Of course, if you keep anything besides Postgres data files on a
partition, you'd possibly want the more secure settings.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Jim Mercer
Date:
Subject: Re: hacker help: PHP-4.2.3 patch to allow restriction of database access
Next
From: Tom Lane
Date:
Subject: Re: hacker help: PHP-4.2.3 patch to allow restriction of database access