aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2021-10-02 17:12:59 -0700
committerPeter Geoghegan <pg@bowt.ie>2021-10-02 17:12:59 -0700
commit2903f1404df37e11ecc303dbc164826c4717194b (patch)
tree4dcbf8ffa25a5e8a3329aafd3d5b9cad8efc4a3d /src
parent9b8d68cc6589814d121344f59e927a7e4506fb8c (diff)
downloadpostgresql-2903f1404df37e11ecc303dbc164826c4717194b.tar.gz
postgresql-2903f1404df37e11ecc303dbc164826c4717194b.zip
Enable deduplication in system catalog indexes.
The "equality implies image equality" opclass infrastructure disallowed deduplication in system catalog indexes and TOAST indexes before now. That seemed like the right approach back when the infrastructure was added by commit 612a1ab7, since ALTER INDEX cannot set deduplicate_items to 'off' (due to an old implementation restriction). But that decision now seems arbitrary at best. Remove special case handling implementing this policy. No catversion bump, since existing catalog indexes will still work. Author: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/CAH2-Wz=rYQHFaJ3WYBdK=xgwxKzaiGMSSrh-ZCREa-pS-7Zjew@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/nbtree/nbtutils.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index d5243107239..39f2e751864 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2698,18 +2698,6 @@ _bt_allequalimage(Relation rel, bool debugmessage)
IndexRelationGetNumberOfKeyAttributes(rel))
return false;
- /*
- * There is no special reason why deduplication cannot work with system
- * relations (i.e. with system catalog indexes and TOAST indexes). We
- * deem deduplication unsafe for these indexes all the same, since the
- * alternative is to force users to always use deduplication, without
- * being able to opt out. (ALTER INDEX is not supported with system
- * indexes, so users would have no way to set the deduplicate_items
- * storage parameter to 'off'.)
- */
- if (IsSystemRelation(rel))
- return false;
-
for (int i = 0; i < IndexRelationGetNumberOfKeyAttributes(rel); i++)
{
Oid opfamily = rel->rd_opfamily[i];