On Tue, Jun 4, 2013 at 10:04 PM, Andres Freund 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 b
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 va
On Tue, Jun 4, 2013 at 12:17 PM, Jeff Janes wrote:
> On Monday, June 3, 2013, Amit Langote wrote:
>>
>> Hello,
>>
>> In what cases can a relation use more buffers (in shared memory) than
>> its pg_class.relpages?
>
>
> I think relpages only counts pages in the main fork, while the buffer cache
> w
On Monday, June 3, 2013, Amit Langote wrote:
> Hello,
>
> In what cases can a relation use more buffers (in shared memory) than
> its pg_class.relpages?
>
I think relpages only counts pages in the main fork, while the buffer cache
will also have buffers for the other forks (visibility map, free s
Hello,
In what cases can a relation use more buffers (in shared memory) than
its pg_class.relpages?
For example, look at the second row in the following:
postgres=# SELECT c.relname,count(*) AS buffers, c.relpages
FROM pg_class c INNER JOIN pg_buffercache b
ON b.relfilenode=c.relfilenode INNER J