Re: PGDOCS - Replica Identity quotes
David Zhang <david.zhang@highgo.ca>
From: David Zhang <david.zhang@highgo.ca>
To: Peter Smith <smithpb2250@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-05T19:28:16Z
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
Commits
-
doc: Fix some markups in logical replication section
- 0890f7d528c4 16.0 landed
-
Allow the use of indexes other than PK and REPLICA IDENTITY on the subscriber.
- 89e46da5e511 16.0 cited