Re: Logical decoding for operations on zheap tables - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Logical decoding for operations on zheap tables
Date
Msg-id CAFiTN-tFV67tSqrNE4NkpnKkj1q5kK3-L41ppApX+JpP6LgOXQ@mail.gmail.com
Whole thread Raw
In response to Re: Logical decoding for operations on zheap tables  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Sat, Jan 12, 2019 at 5:02 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> Fair enough.  I think that for now (and maybe for the first version
> that can be committed) we might want to use heap tuple format.  There
> will be some overhead but I think code-wise, things will be simpler.
> I have prototyped it for Insert and Delete operations of zheap and the
> only thing that is required are new decode functions, see the attached
> patch.  I have done very minimal testing of this patch as this is just
> to show you and others the direction we are taking (w.r.t tuple
> format) to support logical decoding in zheap.
+ */
+ zhtup = DecodeXLogZTuple(tupledata, datalen);
+ reloid = RelidByRelfilenode(change->data.tp.relnode.spcNode,
+ change->data.tp.relnode.relNode);
+ relation = RelationIdGetRelation(reloid);

We need to start a transaction for fetching the relation if it's a
walsender process.  I have fixed this issue in the patch and also
implemented decode functions for zheap update and multi-insert.

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: problems with foreign keys on partitioned tables
Next
From: Amit Langote
Date:
Subject: Typo: llvm*.cpp files identified as llvm*.c