Re: Logical insert/update/delete WAL records for custom table AMs

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical insert/update/delete WAL records for custom table AMs
Date: 2021-11-04 09:03:17
Message-ID: CAA4eK1Jj8g5SDApTRT=gOivvHgRTBuMhFQWOS1=ZXqmmydXmVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 4, 2021 at 7:09 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>
> On Wed, 2021-11-03 at 11:25 +0530, Amit Kapila wrote:
> > You have modeled DecodeLogicalInsert based on current DecodeInsert
> > and
> > it generates the same change message, so not sure how exactly these
> > new messages will be different from current heap_insert/update/delete
> > messages?
>
> Is there a reason you think the messages should be different for heap
> versus another table AM? Isn't the table AM a physical implementation
> detail?
>

We have special handling for speculative insertions and toast
insertions. Can't different tableAM's have different representations
for toast or may be some different concept like speculative
insertions? Similarly, I remember that for zheap we didn't had
TransactionIds for subtransactions so we need to make some changes in
logical decoding to compensate for that. I guess similar stuff could
be required for another table AMs. Then a different table AM can have
a different tuple format which won't work for current change records
unless we convert it to heap tuple format before writing WAL for it.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-11-04 09:36:37 Re: [patch] [doc] Further note required activity aspect of automatic checkpoint and archving
Previous Message Daniel Gustafsson 2021-11-04 08:53:10 Re: CREATE ROLE IF NOT EXISTS