Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum
Дата
Msg-id e3a78e44-ec6c-5924-7832-63de3aad3e9b@gmail.com
обсуждение исходный текст
Ответ на Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-bugs
Hi Alexander,

20.03.2024 13:24, Alexander Korotkov wrote:
> BTW, 0001 and 0002 look good to me. I'm going to push them if no objections. 

Maybe these patches should be polished before committing:
+-- directory paths are passed to us in environment variables
looks like an irrelevant change (perhaps it was relevant in v1/v2, but
that's not so now.)

I'm also not sure about:
+-- BUG: must support different header size of short varlena datum
+-- https://postgr.es/m/7bdbe559-d61a-4ae4-a6e1-48abdf3024cc@postgrespro.ru

AFAICS, for most similar bug fixes, the bug report referenced in a commit
message only (there is no such comment in 0002, either). I also suspect
that the comment:
* Also tuple had short varlena datums with 4B header. ...
might looks incorrect for native English speakers.

This patch also adds a couple of empty lines, which may be not needed.
@@ -2973,6 +2973,7 @@ bt_normalize_tuple(BtreeCheckState *state, IndexTuple itup)
          * index without further processing, so an external varlena header
          * should never be encountered here
          */
 > +
         if (VARATT_IS_EXTERNAL(DatumGetPointer(normalized[i])))
             ereport(ERROR,
                     (errcode(ERRCODE_INDEX_CORRUPTED),
---
         }
+       /*
...
+           need_free[i] = true;
+       }
 > +
     }

Best regards,
Alexander



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Wolfgang Walther
Дата:
Сообщение: Re: Regression tests fail with musl libc because libpq.so can't be loaded
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum