Re: Is it possible to keep track of SELECTs?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Is it possible to keep track of SELECTs?
Дата
Msg-id 9799ff799697aa400573647d5f0c6f39722819fb.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Is it possible to keep track of SELECTs?  (Dominique Devienne <ddevienne@gmail.com>)
Список pgsql-general
On Tue, 2024-03-12 at 16:34 +0100, Dominique Devienne wrote:
> PostgreSQL tables and indexes are ultimately files.
> And there are ways to map them to file names, I've seen in the past.
> So isn't it possible, provided the filesystem tracks last access time, to infer when a table was accessed the last
time? 

Sure, but that won't necessarily tell you when the table was last used.

It could be autovacuum or autoanalyze that last accessed your table.
Also, if the data happen to be in shared buffers, the file won't be read.

Using the PostgreSQL statistics is a much better method.

Yours,
Laurenz Albe



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

Предыдущее
От: Dominique Devienne
Дата:
Сообщение: Re: Is it possible to keep track of SELECTs?
Следующее
От: Avi Weinberg
Дата:
Сообщение: RE: [External] Simple way to simulate a bug in logical replication