Re: WIP: Access method extendability - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: WIP: Access method extendability
Date
Msg-id CAPpHfdtdbZpebkGS1jpt4YhfX2ZPBMgoUiNyX2Gz98BjVZJoHw@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Access method extendability  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: WIP: Access method extendability  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On Tue, Sep 1, 2015 at 6:50 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:
In general pattern of generic WAL usage is following.

1) Start using generic WAL: specify relation

M-m, what about extensions which wants to use WAL but WAL record doesn't connected to any relation? For example, transaction manager or kind of FDW.


GenericXLogStart(index);

2) Register buffers

GenericXLogRegister(0, buffer1, false);
GenericXLogRegister(1, buffer2, true);

first argument is a slot number, second is the buffer, third is flag indicating
new buffer

Why do we need a slot number? to replace already registered buffer?

For further simplification slot number could be omitted. In the attached patches, generic xlog replay applies changes in the same order GenericXLogRegister was called.
Patches was rebased against latest version of am interface rework patch.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 
Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Creating unique or "internal-use-only" column names (ColumnRef)
Next
From: Alvaro Herrera
Date:
Subject: Re: Speed up Clog Access by increasing CLOG buffers