Re: Spreading full-page writes

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>
Subject: Re: Spreading full-page writes
Date: 2014-05-28 07:11:09
Message-ID: 53858C0D.6040906@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/28/2014 09:41 AM, Simon Riggs wrote:
> On 27 May 2014 13:20, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
>> On 05/27/2014 03:18 PM, Simon Riggs wrote:
>>>
>>> IIRC Koichi had a patch for prefetch during recovery. Heikki, is that
>>> the reason you also discussed changing the WAL record format to allow
>>> us to identify the blocks touched by recovery more easily?
>>
>>
>> Yeah, that was one use case I had in mind for the WAL format changes. See
>> http://www.postgresql.org/message-id/533D6CBF.6080203@vmware.com.
>
> Those proposals suggest some very big changes to the way WAL works.
>
> Prefetch can work easily enough for most records - do we really need
> that much churn?
>
> You mentioned Btree vacuum records, but I'm planning to optimize those
> another way.
>
> Why don't we just have the prefetch code in core and forget the WAL
> format changes?

Well, the prefetching was just one example of why the proposed WAL
format changes are a good idea. The changes will make life easier for
any external (or internal, for that matter) tool that wants to read WAL
records. The thing that finally really got me into doing that was
pg_rewind. For pg_rewind it's not enough to cover most records, you have
to catch all modifications to data pages for correctness, and that's
difficult to maintain as new WAL record types are added and old ones are
modified in every release.

Also, the changes make WAL-logging and -replaying code easier to write.
Which reduces the potential for bugs.

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2014-05-28 08:39:32 Re: Allowing join removals for more join types
Previous Message Simon Riggs 2014-05-28 06:47:33 Re: Spreading full-page writes