On Tue, Sep 1, 2015 at 6:50 PM, Teodor Sigaev <teo...@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. http://www.postgresql.org/message-id/CAPpHfduGY=KZSBPZN5+USTXev-9M2PAUp3Yi=syfdo2n244...@mail.gmail.com ------ Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
create-am.3.patch.gz
Description: GNU Zip compressed data
generic-xlog.3.patch.gz
Description: GNU Zip compressed data
bloom-contrib.3.patch.gz
Description: GNU Zip compressed data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers