Re: Logical decoding for operations on zheap tables

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Logical decoding for operations on zheap tables
Date: 2019-01-22 04:37:30
Message-ID: CAFiTN-tFV67tSqrNE4NkpnKkj1q5kK3-L41ppApX+JpP6LgOXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 12, 2019 at 5:02 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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 Content-Type Size
decode_zops_v4.patch application/octet-stream 31.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-01-22 04:43:32 Typo: llvm*.cpp files identified as llvm*.c
Previous Message Amit Langote 2019-01-22 04:29:43 Re: problems with foreign keys on partitioned tables