Re: PGDOCS - Replica Identity quotes

From: David Zhang <david(dot)zhang(at)highgo(dot)ca>
To: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PGDOCS - Replica Identity quotes
Date: 2023-05-05 19:28:16
Message-ID: 8878bf9b-2379-e8a1-5cd5-ec956144e957@highgo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Francisco Luis Arbelaez Lopez 2023-05-05 19:54:10 Bancolombia Open Source Program Office - Proposal of contribution on lock inactive users
Previous Message Alvaro Herrera 2023-05-05 18:43:38 Re: MERGE lacks ruleutils.c decompiling support!?