amcheck is using a wrong macro to check compressed-ness

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема amcheck is using a wrong macro to check compressed-ness
Дата
Msg-id 20220517.162719.1671558681467343711.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответы Re: amcheck is using a wrong macro to check compressed-ness  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hello.

While I looked into a patch, I noticed that check_tuple_attribute does
not run the check for compessed data even if a compressed data is
given.

check_tuple_attribute()
..
    struct varatt_external toast_pointer;
..
    VARATT_EXTERNAL_GET_POINTER(toast_pointer, attr);
..
    if (VARATT_IS_COMPRESSED(&toast_pointer))
    {

Since toast_pointer is a varatt_exteral it should be
VARATT_EXTERNAL_IS_COMPRESSED instead.  Since the just following
corss-check is just the reverse of what the macro does, it is useless.

What do you think about the attached?  The problem code is new in
PG15.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Вложения

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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: has_wal_read_bug
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fix a typo in walreceiver.c