public inbox for [email protected]  
help / color / mirror / Atom feed
From: Euler Taveira <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Greg Nancarrow <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Ajin Cherian <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Dilip Kumar <[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: Amit Langote <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: row filtering for logical replication
Date: Fri, 07 Jan 2022 10:47:44 -0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA4eK1+H8oGrzy7FeOr0ttAqh6r8iKEV7G1QVzOTDLC+60MnRQ@mail.gmail.com>
References: <CAHut+Pv4os_ZtB4uJE6hi_Kp4px6e3WtPTX-7eTK9YJicqq1Cw@mail.gmail.com>
	<CAHut+PsUe3+crzQF_Ljivp5UgxkuEMBM76K=M+8fp41rXb-46Q@mail.gmail.com>
	<OS0PR01MB5716A7ADC776818C5C6F334494429@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<OS0PR01MB571620801232D197AFC1F2C394429@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<TYAPR01MB57240C054D95F0AE55618D2C94439@TYAPR01MB5724.jpnprd01.prod.outlook.com>
	<CAA4eK1J=G4t=e+4a=+qFx5QHpF41ce=2tD_ACMhtMJPzqBknUQ@mail.gmail.com>
	<CAA4eK1Ky0z=+UznCUHOs--L=Es_EMmZ_rxNo8FH73=758sahsQ@mail.gmail.com>
	<CAHut+PsjMh1fkYsAWqJsd_Ks=d0-CwUyp5rMYQf6kzOfyZUYhw@mail.gmail.com>
	<CAA4eK1KyiBPVOzvzpB9LEMnD2fPAGyU_SXaup0WG=mxuGV=Hnw@mail.gmail.com>
	<[email protected]>
	<CAA4eK1Ky220ttru39vptS7WFU+YuobS_wVM7Ei8PcODDt8qR5w@mail.gmail.com>
	<CAA4eK1+H8oGrzy7FeOr0ttAqh6r8iKEV7G1QVzOTDLC+60MnRQ@mail.gmail.com>

On Fri, Jan 7, 2022, at 3:35 AM, Amit Kapila wrote:
> On Fri, Jan 7, 2022 at 9:44 AM Amit Kapila <[email protected]> wrote:
> >
> > On Thu, Jan 6, 2022 at 6:42 PM Euler Taveira <[email protected]> wrote:
> > >
> > > IMO we shouldn't reuse ReorderBufferChangeType. For a long-term solution, it is
> > > fragile. ReorderBufferChangeType has values that do not matter for row filter
> > > and it relies on the fact that REORDER_BUFFER_CHANGE_INSERT,
> > > REORDER_BUFFER_CHANGE_UPDATE and REORDER_BUFFER_CHANGE_DELETE are the first 3
> > > values from the enum, otherwise, it breaks rfnodes and no_filters in
> > > pgoutput_row_filter().
> > >
> >
> > I think you mean to say it will break in pgoutput_row_filter_init(). I
> > see your point but OTOH, if we do what you are suggesting then don't
> > we need an additional mapping between ReorderBufferChangeType and
> > RowFilterPublishAction as row filter and pgoutput_change API need to
> > use those values.
> >
> 
> Can't we use 0,1,2 as indexes for rfnodes/no_filters based on change
> type as they are local variables as that will avoid the fragileness
> you are worried about. I am slightly hesitant to introduce new enum
> when we are already using reorder buffer change type in pgoutput.c.
WFM. I used numbers + comments in a previous patch set [1]. I suggested the enum
because each command would be self explanatory.

[1] https://www.postgresql.org/message-id/49ba49f1-8bdb-40b7-ae9e-f17d88b3afcd%40www.fastmail.com


--
Euler Taveira
EDB   https://www.enterprisedb.com/


view thread (2+ messages)

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], [email protected], [email protected], [email protected]
  Subject: Re: row filtering for logical replication
  In-Reply-To: <[email protected]>

* 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