From: | Stephen Tyler <stephen(at)stephen-tyler(dot)com> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Excessive (and slow) fsync() within single transaction |
Date: | 2009-12-09 23:21:10 |
Message-ID: | 51549ea20912091521m6481980cic013d560519c001d@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Dec 10, 2009 at 8:38 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> PostgreSQL on OS X uses a special fsync method by default named
> 'fsync_writethrough'. If you do this on your database you should be able to
> confirm it's using it:
>
> show wal_sync_method;
>
> This method includes a call to Apple's API to make sure the cache is
> properly flushed on the drives. Lots more details about how all this works
> at http://www.westnet.com/~gsmith/content/postgresql/TuningPGWAL.htm<http://www.westnet.com/%7Egsmith/content/postgresql/TuningPGWAL.htm>
>
>
# show wal_sync_method;
wal_sync_method
-----------------
open_datasync
I don't think I have done anything to change this method from the default
compile settings.
From the documentation:
http://www.postgresql.org/docs/8.4/static/runtime-config-wal.html#RUNTIME-CONFIG-WAL-SETTINGS
· open_datasync (write WAL files with open() option O_DSYNC)
· fdatasync (call fdatasync() at each commit)
· fsync_writethrough (call fsync() at each commit, forcing
write-through of any disk write cache)
· fsync (call fsync() at each commit)
· open_sync (write WAL files with open() option O_SYNC)
Not all of these choices are available on all platforms. The default is the
first method in the above list that is supported by the platform.
So apparently, my system supports open_datasync, and since it is the first
method, that is the default.
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-12-09 23:25:42 | Re: C functions, dll, server fall down |
Previous Message | Andy Shellam (Mailing Lists) | 2009-12-09 22:29:37 | Re: pgAdmin in 8.4 installation uses tools from 8.3 installation |