• Tom Lane's avatar
    Adjust pgstat_initstats() to avoid repeated searches of the TabStat arrays · 11da4c67
    Tom Lane authored
    when a relation is opened multiple times in the same transaction.  This is
    particularly useful for system catalogs, which we may heap_open or index_open
    many times in a transaction, and it doesn't really cost anything extra even
    if the rel is touched but once.  Motivated by study of an example from Greg
    Stark, in which pgstat_initstats() accounted for an unreasonably large
    fraction of the runtime.
    11da4c67
pgstat.c 67.7 KB