I use PostgreSQL 11.1 and I'm trying to gather information from pg_stat_all_indexes
table about indexes usage to determine whether a particular index can be removed or not - according to Index size/usage statistics
section in https://wiki.postgresql.org/wiki/Index_Maintenance.
I noticed that information present there changes over time significantly (from couple of thousand index hits to 0) and I can't find information about these stats lifetime neither in the docs or this table itself. That worries me because I want to be sure, that the decision I'm going to make about index removal was based on stats from long enough period of time.
Is there any way to check how long these statistics are stored in the pg_stat_all_indexes
table?