Re: WAL format and API changes (9.5)

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: WAL format and API changes (9.5)
Дата
Msg-id 53EB9AF6.6050703@vmware.com
обсуждение исходный текст
Ответ на Re: WAL format and API changes (9.5)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Ответы Re: WAL format and API changes (9.5)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: WAL format and API changes (9.5)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: WAL format and API changes (9.5)  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 08/13/2014 04:15 PM, Heikki Linnakangas wrote:
> Hmm, thinking about this some more, there is one sensible way to split
> this patch: We can add the XLogReplayBuffer() function and rewrite all
> the redo routines to use it, without changing any WAL record formats or
> anything in the way the WAL records are constructed. In the patch,
> XLogReplayBuffer() takes one input arument, the block reference ID, and
> it fetches the RelFileNode and BlockNumber of the block based on that.
> Without the WAL format changes, the information isn't there in the
> record, but we can require the callers to pass the RelFileNode and
> BlockNumber. The final patch will remove those arguments from every
> caller, but that's a very mechanical change.
>
> As in the attached patch. I only modified the heapam redo routines to
> use the new XLogReplayBuffer() idiom; the idea is to do that for every
> redo routine.
>
> After applying such a patch, the main WAL format changing patch becomes
> much smaller, and makes it easier to see from the redo routines where
> significant changes to the WAL record formats have been made. This also
> allows us to split the bikeshedding; we can discuss the name of
> XLogReplayBuffer() first :-).

Here's a full version of this refactoring patch, all the rmgr's have now
been updated to use XLogReplayBuffer(). I think this is a worthwhile
change on its own, even if we drop the ball on the rest of the WAL
format patch, because it makes the redo-routines more readable. I
propose to commit this as soon as someone has reviewed it, and we agree
on a for what's currently called XLogReplayBuffer(). I have tested this
with my page-image comparison tool.

- Heikki


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rajmohan C
Дата:
Сообщение: how to implement selectivity injection in postgresql
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: failures on barnacle (CLOBBER_CACHE_RECURSIVELY) because of memory leaks