Re: Scan buffercache for a table

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Scan buffercache for a table
Дата
Msg-id 20230131131151.GK22427@telsasoft.com
обсуждение исходный текст
Ответ на Re: Scan buffercache for a table  (Amin <amin.fallahi@gmail.com>)
Список pgsql-hackers
On Mon, Jan 30, 2023 at 08:11:30PM -0800, Amin wrote:
> Thank you Justin. I started a new thread because the context is a little
> bit different. I am no longer interested in statistics anymore. I want to
> find exact individual pages of a table which are cached and are/aren't
> dirty. pg_buffercache implements the loop, but it goes over all the
> buffers. However, I want to scan a specific table cache pages.

Check ReadBuffer*(), BufTableLookup() or loops around it like
FindAndDropRelationBuffers(), which is in the file you referenced.

> > On Mon, Jan 30, 2023 at 06:01:08PM -0800, Amin wrote:
> > > Hi,
> > >
> > > I am looking for function calls to scan the buffer cache for a table and
> > > find the cached pages. I want to find out which pages are cached and which
> > > of them are dirty. Having the relation id, how can I do that? I have gone
> > > through bufmgr.c and relcache.c, but could not find a way to get
> > > relation-specific pages from the buffer cache.



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

Предыдущее
От: Sébastien Lardière
Дата:
Сообщение: Re: Timeline ID hexadecimal format
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [PoC] Let libpq reject unexpected authentication requests