From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Önder Kalacı <onderkalaci(at)gmail(dot)com>, japin <japinli(at)hotmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, David Steele <david(at)pgmasters(dot)net>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: row filtering for logical replication |
Date: | 2022-02-07 04:37:58 |
Message-ID: | OS3PR01MB5718313C96308D64CFCB08E2942C9@OS3PR01MB5718.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Feb 5, 2022 7:51 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Feb 4, 2022 at 2:58 PM houzj(dot)fnst(at)fujitsu(dot)com <houzj(dot)fnst(at)fujitsu(dot)com>
> wrote:
> >
> > On Thursday, February 3, 2022 11:11 PM houzj(dot)fnst(at)fujitsu(dot)com
> > <houzj(dot)fnst(at)fujitsu(dot)com>
> >
> > Since the v76-0000-clean-up-pgoutput-cache-invalidation.patch has been
> > committed, attach a new version patch set to make the cfbot happy.
> > Also addressed the above comments related to tab-complete in 0002 patch.
> >
>
> I don't like some of the error message changes in this new version. For example:
>
> v75:
> +CREATE FUNCTION testpub_rf_func1(integer, integer) RETURNS boolean AS
> $$ SELECT hashint4($1) > $2 $$ LANGUAGE SQL;
> +CREATE OPERATOR =#> (PROCEDURE = testpub_rf_func1, LEFTARG = integer,
> RIGHTARG = integer);
> +CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> +ERROR: invalid publication WHERE expression for relation "testpub_rf_tbl3"
> +DETAIL: User-defined operators are not allowed.
>
> v77
> +CREATE FUNCTION testpub_rf_func1(integer, integer) RETURNS boolean AS
> $$ SELECT hashint4($1) > $2 $$ LANGUAGE SQL;
> +CREATE OPERATOR =#> (PROCEDURE = testpub_rf_func1, LEFTARG = integer,
> RIGHTARG = integer);
> +CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> +ERROR: invalid publication WHERE expression LINE 1: ...ICATION
> +testpub6 FOR TABLE testpub_rf_tbl3 WHERE (e =#> 27);
> + ^
> +DETAIL: User-defined or mutable functions are not allowed
>
> I think the detailed message by v75 "DETAIL: User-defined operators are not
> allowed." will be easier for users to understand. I have made some code changes
> and refactoring to make this behavior like previous without removing the
> additional checks you have added in v77. I have made a few changes to
> comments and error messages. Attached is a top-up patch on your v77 patch
> series. I suggest we can combine the
> 0001 and 0002 patches as well.
Thanks for the comments.
Your changes look good to me.
Attach the V78 patch which addressed the above changes and merged 0001 and
0002.
Best regards,
Hou zj
Attachment | Content-Type | Size |
---|---|---|
v78-0001-Allow-specifying-row-filters-for-logical-replication.patch | application/octet-stream | 163.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2022-02-07 04:51:31 | Re: Add checkpoint and redo LSN to LogCheckpointEnd log message |
Previous Message | Kyotaro Horiguchi | 2022-02-07 04:24:51 | Re: pg_walfile_name uses XLByteToPrevSeg |