Re: Removing BTScanPosUnpinIfPinned idiom from nbtree, simplifying mark/restore support

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Removing BTScanPosUnpinIfPinned idiom from nbtree, simplifying mark/restore support
Дата
Msg-id CAH2-Wz=TUSgd2HmwffU+GOM+DHJPVRW0ReAZwkZ41rW5hNQe2A@mail.gmail.com
обсуждение исходный текст
Ответ на Removing BTScanPosUnpinIfPinned idiom from nbtree, simplifying mark/restore support  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Wed, Jun 11, 2025 at 1:29 PM Peter Geoghegan <pg@bowt.ie> wrote:
> Removing BTScanPosUnpinIfPinned allows me to significantly simplify
> the management of buffer pins with mark/restore. The patch also gets
> rid of all of the calls to IncrBufferRefCount made from
> nbtree, since it's no longer necessary to support a so->markPos
> representation of a mark that needs its own pin, independent of the
> pin held by/for so->currPos (if so->markPos needs its own pin it'll be
> because it has its own page).

I'm going to withdraw this patch.

The rationale for the patch still makes perfect sense. However, the
patch has now been superseded by the ongoing work on adding a new
amgetbatch interface. That other work (which is tied up in work on I/O
prefetching for index scans) does everything that this patch does as a
stepping stone to allowing nbtree index scans to return batches
(so->currPos style positions that contain at least one matching item
to return to the scan) that are controlled by the caller/the table AM
that manages the index scan.

Independently implementing these changes without any of the much more
extensive changes required for amgetbatch was a useful exercise. But
there's no reason to keep the patch in the next CF anymore.

--
Peter Geoghegan



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