[PATCH] nbtree: Do not show debugmessage if deduplication is disabled
В списке pgsql-hackers по дате отправления:
| От | Justin Pryzby |
|---|---|
| Тема | [PATCH] nbtree: Do not show debugmessage if deduplication is disabled |
| Дата | |
| Msg-id | 20201217012831.GT30237@telsasoft.com обсуждение исходный текст |
| Ответы |
Re: [PATCH] nbtree: Do not show debugmessage if deduplication is disabled
|
| Список | pgsql-hackers |
Even though the message literally says whether the index "can safely" or
"cannot" use deduplication, the function specifically avoids the debug message
for system columns, so I think it also makes sense to hide it when
deduplication is turned off.
diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c
index 2f5f14e527..b78b542429 100644
--- a/src/backend/access/nbtree/nbtutils.c
+++ b/src/backend/access/nbtree/nbtutils.c
@@ -2710,6 +2710,9 @@ _bt_allequalimage(Relation rel, bool debugmessage)
if (IsSystemRelation(rel))
return false;
+ if (!BTGetDeduplicateItems(rel))
+ return false;
+
for (int i = 0; i < IndexRelationGetNumberOfKeyAttributes(rel); i++)
{
Oid opfamily = rel->rd_opfamily[i];
--
2.17.0
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера