Re: New to the list; would this be an okay question?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Christopher Browne <cbbrowne(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: New to the list; would this be an okay question?
Date: 2004-06-21 20:26:33
Message-ID: 20040621202620.GA29383@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 21, 2004 at 08:29:54PM +0100, Richard Huxton wrote:
> Christopher Browne wrote:
> >When this particular application got discussed on local LUG mailing
> >list, this emerged as being one of the factors most likely to be a Big
> >Deal.
>
> Yep, except... Madison said a laptop was involved, so I'm guessing it's
> an IDE drive lying about sync-ing. If fsync is effectively off that
> shouldn't have such a huge effect should it?

The IDE drive lying about syncing is different from fsync being turned
off. What the drive thinks doesn't matter until after Postgres has
written the WAL, closed the transaction and written the pages out. The
fsync will still cause Linux to wait for all the data to be written to
the disk, which is still a finite amount of time, the disk buffer is
only a few MB. Turning fsync off means Linux will never wait, just
buffer in system memory. Similarly, putting it all in one transaction
means that within the transaction there is no waiting, only in
transaction commit.

With fsync on, in/not it transaction can make a really big difference.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2004-06-21 20:52:58 Re: [GENERAL] Building pgadmin on Fedora core 2
Previous Message Heiko Pohl 2004-06-21 20:23:42 Re: Problem while OS-Update