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

Re: [HACKERS] Performance while loading data and indexing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,Greg Copeland <greg(at)copelandconsulting(dot)net>,shridhar_daithankar(at)persistent(dot)co(dot)in,PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>,PostgresSQL General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Performance while loading data and indexing
Date: 2002-09-27 03:07:44
Message-ID: 20359.1033096064@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-performance
Doug McNaught <doug(at)wireboard(dot)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

In response to

pgsql-performance by date

Next:From: Yury BokhoncovichDate: 2002-09-27 05:14:40
Subject: Re: [HACKERS] Performance while loading data and indexing
Previous:From: Yusuf GoolamabbasDate: 2002-09-27 02:55:10
Subject: Would ext3 data=journal help for Postgres synchronous io mode

pgsql-hackers by date

Next:From: Tom LaneDate: 2002-09-27 03:42:44
Subject: Re: hacker help: PHP-4.2.3 patch to allow restriction of database access
Previous:From: Jim MercerDate: 2002-09-27 02:08:29
Subject: Re: hacker help: PHP-4.2.3 patch to allow restriction of database access

pgsql-general by date

Next:From: Alvaro HerreraDate: 2002-09-27 03:31:06
Subject: Re: get date in binary number format
Previous:From: Tom LaneDate: 2002-09-27 02:52:17
Subject: Re: get date in binary number format

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