Re: "full_page_writes" makes no difference?

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Tian Luo <jackrobin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: "full_page_writes" makes no difference?
Date: 2011-05-04 12:27:27
Message-ID: BANLkTi=+uiu+9azsynerA=EcwZtUkT80SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 4, 2011 at 5:46 PM, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>wrote:

>
>
> On Wed, May 4, 2011 at 7:16 AM, Tian Luo <jackrobin(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2011-05-04 12:38:25 Re: branching for 9.2devel
Previous Message Pavan Deolasee 2011-05-04 12:16:00 Re: "full_page_writes" makes no difference?