Re: More buffers used than a relation's relpages
От | Amit Langote |
---|---|
Тема | Re: More buffers used than a relation's relpages |
Дата | |
Msg-id | CA+HiwqH7+cNOdNvQ39XzLhNDtizSqHwg1RhR-WinMig4xuqzPg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: More buffers used than a relation's relpages (Andres Freund <andres@2ndquadrant.com>) |
Список | pgsql-general |
On Tue, Jun 4, 2013 at 10:04 PM, Andres Freund <andres@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
В списке pgsql-general по дате отправления: