Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Önder Kalacı <onderkalaci(at)gmail(dot)com>
Subject: Re: doc: clarify the limitation for logical replication when REPILICA IDENTITY is FULL
Date: 2023-07-10 07:44:39
Message-ID: CAHut+Ps6XYoKzJHGR=bv_sC8qDKVZ5R4LDORVx_zV1+3aHeQ8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 10, 2023 at 1:33 PM Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
>
> Dear hackers,
>
> This is a fork thread from [1]. While analyzing codes I noticed that UPDATE and
> DELETE cannot be replicated when REPLICA IDENTITY is FULL and the table has datatype
> which does not have the operator class of Btree. I thnk this restriction is not
> documented but should be. PSA the patch to add that. Thought?
>
> [1]: https://www.postgresql.org/message-id/TYAPR01MB586687A51AB511E5A7F7D3E6F526A%40TYAPR01MB5866.jpnprd01.prod.outlook.com
>

Hi.

+1 for the patch.

Here are some minor review comments:

======

1.
SUGGESTION (minor reword)
If the published table specifies <literal>REPLICA IDENTITY
FULL</literal> but the table includes an attribute whose datatype is
not an operator class of Btree, then <literal>UPDATE</literal> and
<literal>DELETE</literal> operations cannot be replicated. To make it
work, a primary key should be defined on the subscriber table, or a
different appropriate replica identity must be specified.

2.
Maybe "REPLICA IDENTITY FULL" should have a link, like from this [1] page.

------
[1] 31.1 Publication =
https://www.postgresql.org/docs/current/logical-replication-publication.html

Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message o.tselebrovskiy 2023-07-10 07:51:29 Valgrind errors on 32-bit OS
Previous Message Heikki Linnakangas 2023-07-10 07:44:27 Re: Show various offset arrays for heap WAL records