Re: row filtering for logical replication - Mailing list pgsql-hackers

From Peter Smith
Subject Re: row filtering for logical replication
Date
Msg-id CAHut+Ps1AkCZ6O_bBxK5+K8iLWnq4Og7-nEOTxHD-9dahqL2hQ@mail.gmail.com
Whole thread Raw
In response to RE: row filtering for logical replication  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
List pgsql-hackers
On Thu, Nov 4, 2021 at 2:21 PM houzj.fnst@fujitsu.com
<houzj.fnst@fujitsu.com> wrote:
>
> 3)
>
> +                                       oldctx = MemoryContextSwitchTo(CacheMemoryContext);
> +                                       rfnode = stringToNode(TextDatumGetCString(rfdatum));
> +                                       exprstate = pgoutput_row_filter_init_expr(rfnode);
> +                                       entry->exprstates = lappend(entry->exprstates, exprstate);
> +                                       MemoryContextSwitchTo(oldctx);
> +                               }
>
> Currently in the patch, it save and execute each expression separately. I was
> thinking it might be better if we can use "AND" to combine all the expressions
> into one expression, then we can initialize and optimize the final expression
> and execute it only once.
>

Fixed in v38-0003 [1].

------
[1] https://www.postgresql.org/message-id/CAHut%2BPvWCS%2BW_OLV60AZJucY1RFpkXS%3DhfvYWwpwyMvifdJxiQ%40mail.gmail.com

Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication
Next
From: Michael Paquier
Date:
Subject: Re: removing global variable ThisTimeLineID