Allow the use of a hash index on the subscriber during replication.
Amit Kapila <akapila@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/logical-replication.sgml | modified | +3 −3 |
| src/backend/executor/execReplication.c | modified | +50 −3 |
| src/backend/replication/logical/relation.c | modified | +41 −10 |
| src/backend/utils/cache/lsyscache.c | modified | +22 −0 |
| src/include/executor/executor.h | modified | +1 −0 |
| src/include/utils/lsyscache.h | modified | +1 −0 |
| src/test/subscription/t/032_subscribe_use_index.pl | modified | +68 −0 |
Documentation touched
Discussion
- [Patch] Use *other* indexes on the subscriber when REPLICA IDENTITY is FULL 27 messages · 2023-06-22 → 2023-07-14