On Sat, Jan 12, 2019 at 5:02 PM Amit Kapila <amit.kapil...@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: decode_zops_v4.patch
Description: Binary data

Reply via email to