Re: Buffer Management - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Buffer Management
Date
Msg-id 8765.1025023371@sss.pgh.pa.us
Whole thread Raw
In response to Re: Buffer Management  (Bradley McLean <brad@bradm.net>)
List pgsql-hackers
Bradley McLean <brad@bradm.net> writes:
> Okay, so instead of looking for constraints from the OS on the data file,
> use the constraints on the WAL file.  It would work at the cost of a buffer
> copy?  Er, maybe two:

> mmap the data file and WAL separately.
> Copy the data file page to the WAL mmap area.
> Modify the page.
> msync() the WAL.
> Copy the page to the data file mmap area.
> msync() or not the data file.

Huh?  The primary argument in favor of mmap is to avoid buffer copies;
seems like you are paying that price anyway.  Also, we do not want to
msync WAL for every single WAL record, but I think you'd have to with
the above scheme.  (Assuming you have adequate shared buffer space,
the present scheme only has to fsync WAL at transaction commit and
checkpoints, because it won't actually push out data pages except at
checkpoint time.)
        regards, tom lane




pgsql-hackers by date:

Previous
From: "Jeff MacDonald"
Date:
Subject: Re: Democracy and organisation : let's make a revolution
Next
From: James Hubbard
Date:
Subject: Re: Democracy and organisation : let's make a revolution