Re: Some read stream improvements

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Some read stream improvements
Дата
Msg-id CA+hUKG+tBTizB4-FdAY_V6r6UBXo-tmEF55h-s+1UfkJieheyw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Some read stream improvements  (Kirill Reshke <reshkekirill@gmail.com>)
Список pgsql-hackers
On Mon, Feb 17, 2025 at 6:55 PM Kirill Reshke <reshkekirill@gmail.com> wrote:
> Just out of curiosity, should we `Assert(*index + n <
> stream->queue_size);` in `read_stream_index_advance_n`?

No: it is allowed to be >= queue_size temporarily, but if so we
subtract queue_size.  The result should be equal to (index + n) %
queue_size, assuming small values of n, except we don't want to use %
in hot code.  Perhaps we should assert that though!



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