| From: | Amit Kapila <akapila(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Allow the use of a hash index on the subscriber during replicati |
| Date: | 2023-07-14 03:09:10 |
| Message-ID: | E1qK9B8-000GWA-BI@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2023-07-14 04:15:51 | pgsql: Fix privilege check for SET SESSION AUTHORIZATION. |
| Previous Message | Michael Paquier | 2023-07-14 02:16:48 | pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf |