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

From Peter Smith
Subject Re: row filtering for logical replication
Date
Msg-id CAHut+PtjP4XbJ5orpXTcuatQ36GWZ16iq=R7K1x=XcL+-vKC5Q@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 Tue, Nov 23, 2021 at 6:59 PM houzj.fnst@fujitsu.com
<houzj.fnst@fujitsu.com> wrote:
>
> On Tues, Nov 23, 2021 2:27 PM vignesh C <vignesh21@gmail.com> wrote:
> > On Thu, Nov 18, 2021 at 7:04 AM Peter Smith <smithpb2250@gmail.com>
> > wrote:
> > >
> > > PSA new set of v40* patches.
> >
> > Few comments:
...
> Another comment about v40-0001 patch:
>
>
> +                       char *relname = pstrdup(RelationGetRelationName(rel));
> +
>                         table_close(rel, ShareUpdateExclusiveLock);
> +
> +                       /* Disallow duplicate tables if there are any with row-filters. */
> +                       if (t->whereClause || list_member_oid(relids_with_rf, myrelid))
> +                               ereport(ERROR,
> +                                               (errcode(ERRCODE_DUPLICATE_OBJECT),
> +                                                errmsg("conflicting or redundant row-filters for \"%s\"",
> +                                                               relname)));
> +                       pfree(relname);
>
> Maybe we can do the error check before table_close(), so that we don't need to
> invoke pstrdup() and pfree().
>

Fixed in v44 [1]

------
[1] https://www.postgresql.org/message-id/CAHut%2BPtjxzedJPbSZyb9pd72%2BUrGEj6HagQQbCdO0YJvr7OyJg%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: Peter Smith
Date:
Subject: Re: row filtering for logical replication