Re: row filtering for logical replication

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: row filtering for logical replication
Дата
Msg-id CAHut+PtJTWFKBNzWAJQTVu82G6q2R7s7pe1gUZvEnqd96WEKcQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: row filtering for logical replication  (Greg Nancarrow <gregn4422@gmail.com>)
Список pgsql-hackers
On Wed, Oct 27, 2021 at 7:21 PM Greg Nancarrow <gregn4422@gmail.com> wrote:
>
> Regarding the v34-0006 patch, shouldn't it also include an update to
> the rowfilter_expr_checker() function added by the v34-0002 patch, for
> validating the referenced row-filter columns in the case of UPDATE?
> I was thinking something like the following (or is it more complex than this?):
>
> diff --git a/src/backend/catalog/pg_publication.c
> b/src/backend/catalog/pg_publication.c
> index dc2f4597e6..579e727b10 100644
> --- a/src/backend/catalog/pg_publication.c
> +++ b/src/backend/catalog/pg_publication.c
> @@ -162,12 +162,10 @@ rowfilter_expr_checker(Publication *pub,
> ParseState *pstate, Node *rfnode, Relat
>     rowfilter_validator(relname, rfnode);
>
>     /*
> -    * Rule 2: For "delete", check that filter cols are also valid replica
> -    * identity cols.
> -    *
> -    * TODO - check later for publish "update" case.
> +    * Rule 2: For "delete" and "update", check that filter cols are also
> +    * valid replica identity cols.
>      */
> -   if (pub->pubactions.pubdelete)
> +   if (pub->pubactions.pubdelete || pub->pubactions.pubupdate)
>     {
>         char replica_identity = rel->rd_rel->relreplident;
>

Fixed in v37-0006 [1]

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

Kind Regards,
Peter Smith.
Fujitsu Australia



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: row filtering for logical replication
Следующее
От: Peter Smith
Дата:
Сообщение: Re: row filtering for logical replication