Re: posix_fadvise missing in the walsender

From: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: posix_fadvise missing in the walsender
Date: 2013-03-01 21:51:13
Message-ID: 871ubyaiwe.fsf@mid.deneb.enyo.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Jeff Janes:

> Does the kernel really read a data block from disk into memory in
> order to immediately overwrite it? I would have thought it would
> optimize that away, at least if the writes are sized and aligned to
> 512 or 1024 bytes blocks (which WAL should be).

With Linux, you'd have to use O_DIRECT to get that effect (but don't
do that), otherwise writes happen in page size granularity, writing in
512 or 1024 byte blocks should really trigger a read-modify-write
cycle.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-03-02 02:38:47 Re: Memory leakage associated with plperl spi_prepare/spi_freeplan
Previous Message Alvaro Herrera 2013-03-01 21:48:02 Re: sql_drop Event Trigger