diff options
author | Masahiko Sawada | 2023-07-13 06:03:17 +0000 |
---|---|---|
committer | Masahiko Sawada | 2023-07-13 06:03:17 +0000 |
commit | fd48a86c6241b994ce67c8b53a918e6b42c8063c (patch) | |
tree | 13f45e1d62a0b20851773c3060079bfa96fcb268 /doc/src | |
parent | 0fef8775382886bef023aee67cb744711ed7a32f (diff) |
Doc: clarify the conditions of usable indexes for REPLICA IDENTITY FULL tables.
Commit 89e46da5e allowed REPLICA IDENTITY FULL tables to use an index
on the subscriber during apply of update/delete. This commit clarifies
in the documentation that the leftmost field of candidate indexes must
be a column (not an expression) that references the published relation
column.
The source code comments are also updated accordingly.
Reviewed-by: Peter Smith, Amit Kapila
Discussion: https://postgr.es/m/CAD21AoDJjffEvUFKXT27Q5U8-UU9JHv4rrJ9Ke8Zkc5UPWHLvA@mail.gmail.com
Backpatch-through: 16
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/logical-replication.sgml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index c5de2040f78..c2a749d8828 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -134,12 +134,12 @@ to replica identity <literal>FULL</literal>, which means the entire row becomes the key. When replica identity <literal>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 <literal>FULL</literal> should only be used as a + indexes must be btree, non-partial, and the leftmost index field must be a + column (not an expression) that references the published table column. 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 <literal>FULL</literal> should only be used as a fallback if no other solution is possible. If a replica identity other than <literal>FULL</literal> is set on the publisher side, a replica identity comprising the same or fewer columns must also be set on the subscriber |