pgsql: Allow the use of a hash index on the subscriber during replicati - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Allow the use of a hash index on the subscriber during replicati
Date
Msg-id E1qK9B8-000GWA-BI@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf
Next
From: Nathan Bossart
Date:
Subject: pgsql: Fix privilege check for SET SESSION AUTHORIZATION.