Re: PGDOCS - Replica Identity quotes

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: David Zhang <david(dot)zhang(at)highgo(dot)ca>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PGDOCS - Replica Identity quotes
Date: 2023-05-08 00:29:50
Message-ID: CAHut+PsmxdVwQkegt_DxxdF9tsk-xZzEzR2sUD0ydBeGbMDNhQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 6, 2023 at 5:28 AM David Zhang <david(dot)zhang(at)highgo(dot)ca> wrote:
>
> On 2023-03-16 4:46 p.m., Peter Smith wrote:
> > A rebase was needed due to the recent REPLICA IDENTITY push [1].
> >
> > PSA v2.
> >
> > <para>
> > - A published table must have a <quote>replica identity</quote> configured in
> > + A published table must have a <firstterm>replica identity</firstterm> configured in
> +1
> > order to be able to replicate <command>UPDATE</command>
> > and <command>DELETE</command> operations, so that appropriate rows to
> > update or delete can be identified on the subscriber side. By default,
> > this is the primary key, if there is one. Another unique index (with
> > certain additional requirements) can also be set to be the replica
> > identity. If the table does not have any suitable key, then it can be set
> > - to replica identity <quote>full</quote>, which means the entire row becomes
> > - the key. When replica identity <quote>full</quote> is specified,
> > + to <literal>REPLICA IDENTITY FULL</literal>, which means the entire row becomes
> > + the key. When <literal>REPLICA IDENTITY FULL</literal> is specified,
> > indexes can be used on the subscriber side for searching the rows. Candidate
> > indexes must be btree, non-partial, and have at least one column reference
> > (i.e. cannot consist of only expressions). These restrictions
> > on the non-unique index properties adhere to some of the restrictions that
> > are enforced for primary keys. If there are no such suitable indexes,
> > the search on the subscriber side can be very inefficient, therefore
> > - replica identity <quote>full</quote> should only be used as a
> > + <literal>REPLICA IDENTITY FULL</literal> should only be used as a
> > fallback if no other solution is possible. If a replica identity other
> IMO, it would be better just change "full" to "FULL". On one side, it
> can emphasize that "FULL" is one of the specific values (DEFAULT | USING
> INDEX index_name | FULL | NOTHING); on the other side, it leaves
> "replica identity" in lowercase to be more consistent with the
> terminology used in this entire paragraph.
> > - than <quote>full</quote> is set on the publisher side, a replica identity
> > + than <literal>FULL</literal> is set on the publisher side, a replica identity
> +1
> > comprising the same or fewer columns must also be set on the subscriber
> > side. See <xref linkend="sql-altertable-replica-identity"/> for details on
> > how to set the replica identity. If a table without a replica identity is
>

Thanks for giving some feedback on my patch.

PSA v3 which is changed per your suggestion.

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

Attachment Content-Type Size
v3-0001-PGDOCS-replica-identity-quotes.patch application/octet-stream 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-05-08 00:31:06 Re: Add LZ4 compression in pg_dump
Previous Message Michael Paquier 2023-05-07 22:26:23 Re: Add LZ4 compression in pg_dump