Re: checking snapshot argument for index_beginscan

Поиск
Список
Период
Сортировка
От Pavel Borisov
Тема Re: checking snapshot argument for index_beginscan
Дата
Msg-id CALT9ZEE95m020P0-pq4we6-LkkkhFFKOfBzRjXTZWxp=ot7=AA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: checking snapshot argument for index_beginscan  (Ted Yu <yuzhihong@gmail.com>)
Список pgsql-hackers
On Fri, 23 Dec 2022 at 00:36, Ted Yu <yuzhihong@gmail.com> wrote:
>>
>> Hi,
>> I was looking at commit 941aa6a6268a6a66f6895401aad6b5329111d412 .
>>
>> I think it would be better to move the assertion into `index_beginscan_internal` because it is called by
index_beginscanand index_beginscan_bitmap
 
>>
>> In the future, when a new variant of `index_beginscan_XX` is added, the assertion would be effective for the new
variant.
>>
>> Please let me know what you think.

Hi, Ted!

The two asserts out of four could be combined as you proposed in the patch.
Assert added by 941aa6a6268a6a66f6 to index_parallelscan_initialize
should remain anyway as otherwise, we can have Segfault in
SerializeSnapshot called from this function.
Assert in index_parallelscan_estimate can be omitted as there is the
same assert inside EstimateSnapshotSpace called from this function.
I've included it into version 2 of a patch.

Not sure it's worth the effort but IMO the patch is right and can be committed.

Kind regards,
Pavel Borisov,
Supabase.

Вложения

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

Предыдущее
От: Ted Yu
Дата:
Сообщение: Re: checking snapshot argument for index_beginscan
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: Schema variables - new implementation for Postgres 15 (typo)