From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Logical decoding for operations on zheap tables |
Date: | 2019-01-03 03:58:12 |
Message-ID: | CAA4eK1JcDHhAXP8TRwdCzDP8j9CCfM1QEfk54GPyGHOAj0DBng@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 31, 2018 at 9:56 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> To support logical decoding for zheap operations, we need a way to
> ensure zheap tuples can be registered as change streams. One idea
> could be that we make ReorderBufferChange aware of another kind of
> tuples as well, something like this:
>
..
>
> Apart from this, we need to define different decode functions for
> zheap operations as the WAL data is different for heap and zheap, so
> same functions can't be used to decode.
>
> I have written a very hacky version to support zheap Insert operation
> based on the above idea.
>
I went ahead and tried to implement the decoding for Delete operation
as well based on the above approach and the result is attached.
>
> The yet another approach could be that in the decode functions after
> forming zheap tuples from WAL, we can convert them to heap tuples. I
> have not tried that, so not sure if it can work, but it seems to me if
> we can avoid tuple conversion overhead, it will be good.
>
While implementing the decoding for delete operation, I noticed that
the main changes required are to write a decode operation and
additional WAL (like old tuple) which anyway is required even if we
pursue this approach, so I think it might be better to with the
approach where we don't need tuple conversion (aka something similar
to what is done in attached patch).
Note - This patch is based on pluggable-zheap branch
(https://github.com/anarazel/postgres-pluggable-storage)
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
decode_zops_2.patch | application/octet-stream | 26.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-01-03 05:34:31 | Re: Refactoring the checkpointer's fsync request queue |
Previous Message | Michael Paquier | 2019-01-03 01:15:22 | Re: BUG #15548: Unaccent does not remove combining diacritical characters |