On Tue, Jun 4, 2013 at 10:04 PM, Andres Freund <and...@2ndquadrant.com> wrote: > On 2013-06-04 11:29:44 +0900, Amit Langote wrote: >> In what cases can a relation use more buffers (in shared memory) than >> its pg_class.relpages? > > relpages is primarily updated by (auto-)vacuum, (auto-)analyze, so it > frequently lags behind reality in a growing relation. Why do you need an > exact value? >
I think I forgot that pg_class.relpages is a statistic that needs updates to reflect its current value. I don't need it (the value) for anything per se, was just wondering if I was missing something about such an observation. I was using pg_buffercache to understand what kind of page traffic a pg_trgm index generates and in one case when it just finished building a pg_trgm index (say, abc_idx) over a relation (say, abc), I observed that the relation's (abc's) shared buffers count was one more than its relpages at that moment. -- Amit Langote -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general