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

From Peter Smith
Subject Re: row filtering for logical replication
Date
Msg-id CAHut+PtKnmgk_aC-Mv_JrAMwDaPLtWYz=gpn=uFTh=9pRJea4A@mail.gmail.com
Whole thread Raw
In response to Re: row filtering for logical replication  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Tue, Nov 23, 2021 at 5:27 PM vignesh C <vignesh21@gmail.com> wrote:
>

> 2) Since the error message is because it publishes delete/update
> operations, it should include publish delete/update in the error
> message. Can we change the error message:
> +               if (!bms_is_member(attnum -
> FirstLowInvalidHeapAttributeNumber, context->bms_replident))
> +               {
> +                       const char *colname = get_attname(relid, attnum, false);
> +
> +                       ereport(ERROR,
> +
> (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
> +                                       errmsg("cannot add relation
> \"%s\" to publication",
> +
> RelationGetRelationName(context->rel)),
> +                                       errdetail("Row filter column
> \"%s\" is not part of the REPLICA IDENTITY",
> +                                                         colname)));
> +               }
>
> To something like:
> ereport(ERROR,
> (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
> errmsg("cannot add relation \"%s\" to publication because row filter
> column \"%s\" does not have a replica identity and publishes
> deletes/updates",
>    RelationGetRelationName(context->rel), colname),
> errhint("To enable deleting/updating from the table, set REPLICA
> IDENTITY using ALTER TABLE")));
>

The "top-up" patch 0005 (see v43*) is already addressing this now.

------
Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: O(n) tasks cause lengthy startups and checkpoints
Next
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication