Allow the use of a hash index on the subscriber during replication.
Commit 89e46da5e5 allowed using BTREE indexes that are neither
PRIMARY KEY nor REPLICA IDENTITY on the subscriber during apply of
update/delete. This patch extends that functionality to also allow HASH
indexes.
We explored supporting other index access methods as well but they don't
have a fixed strategy for equality operation which is required by the
current infrastructure in logical replication to scan the indexes.
Author: Kuroda Hayato
Reviewed-by: Peter Smith, Onder Kalaci, Amit Kapila
Discussion: https://postgr.es/m/TYAPR01MB58669D7414E59664E17A5827F522A@TYAPR01MB5866.jpnprd01.prod.outlook.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/edca3424342da323499a1998d18a888283e52ac7
Modified Files
--------------
doc/src/sgml/logical-replication.sgml | 6 +-
src/backend/executor/execReplication.c | 53 ++++++++++++++++-
src/backend/replication/logical/relation.c | 51 ++++++++++++----
src/backend/utils/cache/lsyscache.c | 22 +++++++
src/include/executor/executor.h | 1 +
src/include/utils/lsyscache.h | 1 +
src/test/subscription/t/032_subscribe_use_index.pl | 68 ++++++++++++++++++++++
7 files changed, 186 insertions(+), 16 deletions(-)