pg_stat_statements stores query text not in its in-memory hash table but in a separate on-disk file (pgss_query_texts.stat) inside the Postgres data directory. Each hash table entry holds an offset and length pointer into this append-only file. The file grows to roughly 2× the mean query length multiplied by pg_stat_statements.max, and when it hits that ceiling, Postgres rewrites it entirely under a brief lock. Because evicted queryids are forgotten, the same query text can appear multiple times. ORM-heavy workloads are the most common cause of the file ballooning to hundreds of megabytes due to verbose SQL and high queryid cardinality. Using pg_stat_statements(false) skips the file read entirely, which is useful when only metrics are needed.