From 8f9e934ab746907abbeeed06a1a9b995e5b4d339 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 21 Jan 2019 18:33:32 -0500 Subject: [PATCH] Remove useless bms_copy step in RelationGetIndexAttrBitmap. Seems to be from a bad case of copy-and-paste-itis in commit 665d1fad9. It wouldn't be quite so annoying if it didn't contradict the comment half a dozen lines above. David Rowley Discussion: https://postgr.es/m/CAKJS1f95Dyf8Qkdz4W+PbCmT-HTb54tkqUCC8isa2RVgSJ_pXQ@mail.gmail.com --- src/backend/utils/cache/relcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 007aaf801b..6ee0621008 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -4840,7 +4840,7 @@ restart: case INDEX_ATTR_BITMAP_KEY: return uindexattrs; case INDEX_ATTR_BITMAP_PRIMARY_KEY: - return bms_copy(relation->rd_pkattr); + return pkindexattrs; case INDEX_ATTR_BITMAP_IDENTITY_KEY: return idindexattrs; default: -- 2.40.0