On Thu, Nov 4, 2021 at 7:09 AM Jeff Davis <pg...@j-davis.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.