On Wed, May 4, 2011 at 5:46 PM, Pavan Deolasee <pavan.deola...@gmail.com>wrote:
> > > On Wed, May 4, 2011 at 7:16 AM, Tian Luo <jackro...@gmail.com> wrote: > >> Hi guys, >> >> No matter I turn on or turn off the "full_page_writes", I always >> observe 8192-byte writes of log data for simple write operations >> (write/update). >> >> > Not sure how you measured it, but ISTM that the correct GUC to play with is > "fsync". If thats turned off, the WAL buffers won't be fsynced to the disk > at every commit. But that would mean reduced reliability in case of database > crash. > > > And I should have added that post 8.3, we also have a user-settable parameter called synchronous_commit. Normally, database must write WAL up to the commit record to the stable storage when a transaction commits to ensure that there is no data loss in case of database crash. But if synchronous_commit is turned off, the database might delay writing the WAL buffers to the disk, thus reducing write activity, but at a increased risk of data loss. http://www.postgresql.org/docs/8.3/static/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com