| From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
|---|---|
| To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
| Subject: | More buffers used than a relation's relpages |
| Date: | 2013-06-04 02:29:44 |
| Message-ID: | CA+HiwqHcjrV4Exwxz-w5f9uWiAh64Fh_8QidJKfOFK9g5TK3kQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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 JOIN pg_database d
ON (b.reldatabase=d.oid AND d.datname=current_database())
GROUP BY c.relname,c.relpages
ORDER BY 2 DESC;
relname | buffers | relpages
-----------------------------------+---------+----------
abc_idx | 4800 | 4800
abc | 3548 | 3547
abc_2_idx | 3209 | 3209
...
...
--
Amit Langote
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Janes | 2013-06-04 03:17:57 | Re: More buffers used than a relation's relpages |
| Previous Message | David Johnston | 2013-06-03 21:54:50 | Re: Passing a WHERE clause by trigger to a function |