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