Re: ReadRecentBuffer() doesn't scale well

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: ReadRecentBuffer() doesn't scale well
Дата
Msg-id CA+hUKGKkAOAb53tfWVJ_a+x=y=mf3pHv2nj=VzNHHOYP90vSwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ReadRecentBuffer() doesn't scale well  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: ReadRecentBuffer() doesn't scale well  (Peter Geoghegan <pg@bowt.ie>)
Re: ReadRecentBuffer() doesn't scale well  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Jun 27, 2023 at 4:32 PM Peter Geoghegan <pg@bowt.ie> wrote:
> On Mon, Jun 26, 2023 at 9:09 PM Andres Freund <andres@anarazel.de> wrote:
> > I think we should be able to have a post-check that can figure out
> > if the copied root page is out of date after searching it, without needing the
> > content lock.
>
> I'm guessing that you're thinking of doing something with the page LSN?

If the goal is to get rid of both pins and content locks, LSN isn't
enough.  A page might be evicted and replaced by another page that has
the same LSN because they were modified by the same record.  Maybe
that's vanishingly rare, but the correct thing would be counter that
goes up on modification AND eviction.  (FWIW I toyed with variants of
this concept in the context of SLRU -> buffer pool migration, where I
was trying to do zero-lock CLOG lookups; in that case I didn't need
the copy of the page being discussed here due to the data being
atomically readable, but I had the same requirement for a
"did-it-change-under-my-feet?" check).



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: ReadRecentBuffer() doesn't scale well
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: ReadRecentBuffer() doesn't scale well