Re: bogus assert in logicalmsg_desc

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: bogus assert in logicalmsg_desc
Дата
Msg-id CAMbWs489R=QhjhaJLdR2R31UHKox9iviHHQ+ki60cetVjjERkg@mail.gmail.com
обсуждение исходный текст
Ответ на bogus assert in logicalmsg_desc  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers

On Mon, Aug 15, 2022 at 12:17 AM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:
So prefix_size includes the null byte, so the assert points out at the
first payload byte. And of course, the check should be "==" because we
expect the byte to be \0, not the other way around.

Yes, indeed. There is even a comment emphasizing the trailing null byte
in LogLogicalMessage.

    /* trailing zero is critical; see logicalmsg_desc */

 

Attached is a patch addressing this. This was added in 14, so we should
backpatch to that version.

+1 for the patch.

Thanks
Richard 

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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: bogus assert in logicalmsg_desc
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Cleaning up historical portability baggage