Block duplications in a shared buffers

From: pinker <pinker(at)onet(dot)eu>
To: pgsql-general(at)postgresql(dot)org
Subject: Block duplications in a shared buffers
Date: 2017-11-07 15:15:03
Message-ID: 1510067703470-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,
I was analysing shared buffers content and noticed that exactly the same
disk block appears there many times with different or the same usagecount.
What's the cause of that? It's because of transactions?

SELECT
count(*),
relfilenode,
relblocknumber,
array_agg(usagecount) usagecount,
array_agg(isdirty) isdirty,
array_agg(bufferid) bufferid
FROM fo_main.buffercache
WHERE added = 'some_date'
GROUP BY relfilenode, relblocknumber
HAVING count(*) > 1
ORDER BY 1 DESC;

Sample result:

<http://www.postgresql-archive.org/file/t342733/Auswahl_830.png>

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-11-07 15:27:45 Re: Block duplications in a shared buffers
Previous Message David G. Johnston 2017-11-07 15:07:47 Re: Naming conventions for column names