public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ajin Cherian <[email protected]>
To: Dilip Kumar <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Önder Kalacı <[email protected]>
Cc: japin <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: David Steele <[email protected]>
Cc: Craig Ringer <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: Amit Langote <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: row filtering for logical replication
Date: Tue, 12 Oct 2021 13:33:12 +1100
Message-ID: <CAFPTHDYfipttorJ-SkWerWHDP_GmtAipW5LLLeEt5Y3+PptVPw@mail.gmail.com> (raw)
In-Reply-To: <CAFiTN-uXTHcFkODayUsSMFp-7XLXQk=sOV2mJi6tDv-TjQAEBw@mail.gmail.com>
References: <CA+HiwqH+9NK5m-=BOYpzjH5UEpeWjT_3HEm4XBYNrda88naGMQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<ME3P282MB16678160F5EA09DCB962474EB6B69@ME3P282MB1667.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<YBjc/[email protected]>
<MEYP282MB16699D041638CE2F8284701FB6B59@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<MEYP282MB1669F5063EC084C0C5854EB1B6B59@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<[email protected]>
<CACawEhW0NUMHHAQjVP_xM8gWXKvy9haK9nKhC-H=Qn2yTCv-=g@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAH2L28tjTYctr+eu6Vg5U6iihVhe6P+qKnB_diMGy4=CfwXzdg@mail.gmail.com>
<CAH2L28sS8=jY6Lj2-xVu6exxQ9gK8uGZr9jf64zDw9hacMrkyA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAH2L28tvKGLO9ZRFsaA5msXqZzF6wHgxgXNvnCQ2dRQfs1T8XQ@mail.gmail.com>
<[email protected]>
<CAA4eK1Lu7oPHm2j=nLeqZLVoro76E0EWvH+5wmGG39iJNBzUog@mail.gmail.com>
<[email protected]>
<CAHut+PvrJHz_9HG5jvqHWe=FZLz9A+CxyJDyZKsHmY8THU+pjg@mail.gmail.com>
<[email protected]>
<CAHut+PvCWX8WauZJkXfgL08nn8+rDsTdxQinhyL1z2+E7r06fw@mail.gmail.com>
<CAA4eK1LPh+KCALU1Eo4itWq+bYU6NzUGr4dwypMynM3Skjvv5A@mail.gmail.com>
<[email protected]>
<CAHut+Ps3GgPKUJ2npfY4bQdxAmYW+yQin+hQuBsMYvX=kBqEpA@mail.gmail.com>
<[email protected]>
<CAA4eK1+xQb06NGs6Y7OzwMtKYYixEqR8tdWV5THAVE4SAqNrDg@mail.gmail.com>
<CAHut+Ps5j7mkO0xLmNW=kXh0eezGoKyzBCiQc9bfkCiM_MVDrg@mail.gmail.com>
<[email protected]>
<CAA4eK1JXYQ3B7kLXwi2buDP-LZ_qnqZDf=nDTPt_c8hHkyztww@mail.gmail.com>
<CAA4eK1+qd1OATDSZCrjebZx+3qm1=RmF-fDU_1YsT__XYnxvVA@mail.gmail.com>
<CAHut+Pvn+S8upyrkBi3m=rc4b5Ttw3xGsg09rNec=qJK0pD5mQ@mail.gmail.com>
<CAA4eK1J1FNhDhj85Am1X_5VTxKOYo_nSBMuuMteB3n5YVPMdpw@mail.gmail.com>
<CAHut+PtbKUmWNjTEDMVhP9abjgph6JB7vUFYF7ioa_4uRPZb=A@mail.gmail.com>
<CAA4eK1LPhubcm4o1Xg0RwZdatqwfz3KKYcdun8QvRyqFthyJ1g@mail.gmail.com>
<CAHut+PtFxoP477E8odkxkpyDoH_tiNBSiJH-j88NR728nxPErQ@mail.gmail.com>
<CAA4eK1+tio46goUKBUfAKFsFVxtgk8nOty=TxKoKH-gdLzHD2g@mail.gmail.com>
<CAHut+PtdRU74kUZd2RugdCqB0Ya1L+BbZk45czM5ufQs5E8jmw@mail.gmail.com>
<CAHut+PsgRHymwLhJ9t3By6+KNaVDzfjf6Y4Aq=JRD-y8t1mEFg@mail.gmail.com>
<[email protected]>
<CAFPTHDb7bpkuc4SxaL9B5vEvF2aEi0EOERdrG+xgVeAyMJsF=Q@mail.gmail.com>
<CAFPTHDYZk4P1kD=y6qMBnzh66+CgnfV3VTK7yS-Tk1eGrFOVZg@mail.gmail.com>
<CAA4eK1KNPWVuV-bwH8J8LtZWzh+PpQ+Rz0Lab2mpL=BA97hi3A@mail.gmail.com>
<CAFiTN-sGR_MbOVhcdYgNhWe-GRzPg12q=j7S00zXfW_OzQDPuQ@mail.gmail.com>
<CAFPTHDZmRdRZ3hz4YTQ8XqeSzzdsHKqwYQb+6Q5MG-bRX0nc-g@mail.gmail.com>
<CAFiTN-uGr4jG2LTOz_nU2tKoPvgQSHoScMTsFaKVxbFeNAkvYA@mail.gmail.com>
<CAA4eK1LjrEFOrpZ7t_uCp4-qGA3VyNaL2h_+wY26=3uEyE66vg@mail.gmail.com>
<CAFiTN-vauBL5fWZRSO0XPcO4ATT2z4epemEDKmeAHXdTorUMtg@mail.gmail.com>
<CAA4eK1KRZGrCnhRCusH-k0K8RZ2qL=dp2eXLSDJCMtWHBcRygg@mail.gmail.com>
<CAFiTN-vwBjy+eR+iodkO5UVN5cPv_xx1=s8ehzgCRJZA+AztAA@mail.gmail.com>
<CAFiTN-ug0kSDJyYxkz9L5UMLjf1vA+7cnY8Co7zU=Vom1MfG7A@mail.gmail.com>
<CAFPTHDbVR+097SSvSM8KCjyvqrKq13NoSgCqQj06d3BYVZREVA@mail.gmail.com>
<CAA4eK1JgBRRZ9LnSzgHYJ0UM4n1guMfvkmRj8xm9iaZW8Wdj=w@mail.gmail.com>
<CAFPTHDaUQHdZ0RQYM8dVeBHAnvBZRYqDCBBK9r6GxBX0HL1xGQ@mail.gmail.com>
<CAFPTHDaCeMuHnz7SonsvqDxHvcF7XD-LRLjVCqEBcyk5QgyMVg@mail.gmail.com>
<CAFPTHDZH+uuKU0uRXFZQri1v96-YnPAu6SorhZycM+=GCKvYQA@mail.gmail.com>
<CAFiTN-uXTHcFkODayUsSMFp-7XLXQk=sOV2mJi6tDv-TjQAEBw@mail.gmail.com>
On Tue, Oct 12, 2021 at 1:37 AM Dilip Kumar <[email protected]> wrote:
>
> On Wed, Oct 6, 2021 at 2:33 PM Ajin Cherian <[email protected]> wrote:
> >
> > On Sat, Oct 2, 2021 at 5:44 PM Ajin Cherian <[email protected]> wrote:
> > >
> > > I have for now also rebased the patch and merged the first 5 patches
> > > into 1, and added my changes for the above into the second patch.
> >
> > I have split the patches back again, just to be consistent with the
> > original state of the patches. Sorry for the inconvenience.
>
> Thanks for the updated version of the patch, I was looking into the
> latest version and I have a few comments.
>
>
> + if ((att->attlen == -1 &&
> VARATT_IS_EXTERNAL_ONDISK(tmp_new_slot->tts_values[i])) &&
> + (!old_slot->tts_isnull[i] &&
> + !(VARATT_IS_EXTERNAL_ONDISK(old_slot->tts_values[i]))))
> + {
> + tmp_new_slot->tts_values[i] = old_slot->tts_values[i];
> + newtup_changed = true;
> + }
>
> If the attribute is stored EXTERNAL_ONDIS on the new tuple and it is
> not null in the old tuple then it must be logged completely in the old
> tuple, so instead of checking
> !(VARATT_IS_EXTERNAL_ONDISK(old_slot->tts_values[i]), it should be
> asserted,
>
>
> + heap_deform_tuple(newtuple, desc, new_slot->tts_values,
> new_slot->tts_isnull);
> + heap_deform_tuple(oldtuple, desc, old_slot->tts_values,
> old_slot->tts_isnull);
> +
> + if (newtup_changed)
> + tmpnewtuple = heap_form_tuple(desc, tmp_new_slot->tts_values,
> new_slot->tts_isnull);
> +
> + old_matched = pgoutput_row_filter(relation, NULL, oldtuple, entry);
> + new_matched = pgoutput_row_filter(relation, NULL,
> + newtup_changed ? tmpnewtuple :
> newtuple, entry);
>
> I do not like the fact that, first we have deformed the tuples and we
> are again using the HeapTuple
> for expression evaluation machinery and later the expression
> evaluation we do the deform again.
>
> So why don't you use the deformed tuple as it is to store as a virtual tuple?
>
> Infact, if newtup_changed is true then you are forming back the tuple
> just to get it deformed again
> in the expression evaluation.
>
> I think I have already given this comment on the last version.
Right, I only used the deformed tuple later when it was written to the
stream. I will modify this as well.
regards,
Ajin Cherian
Fujitsu Australia
view thread (489+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: row filtering for logical replication
In-Reply-To: <CAFPTHDYfipttorJ-SkWerWHDP_GmtAipW5LLLeEt5Y3+PptVPw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox