Question about read_stream_look_ahead()

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Question about read_stream_look_ahead()
Дата
Msg-id CAFiTN-uxyf7qOkOStDbu_WZFOFCXOGkjqNeOiH+V9D1EBHkhyA@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

I was looking into this function, especially this block of code[1], so
what I have noticed is that we always try to combine the sequential
block when the lookahead blocknum is higher than the
pending_read_blocknum, that's fine for ForwardScan.  My question is
should we do something for backward scanning as well?  I mean if we
haven't yet started the I/O then shouldn't we try to merge blocknum
which are smaller than pending_read_blocknum  which would be the
normal case in backward scan.  I mean we would need to change the
start block number in this case though.


[1]
/* Can we merge it with the pending read? */
if (stream->pending_read_nblocks > 0 &&
stream->pending_read_blocknum + stream->pending_read_nblocks == blocknum)
{
stream->pending_read_nblocks++;
continue;
}

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



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