From: pinker <pinker@onet.eu>
To: pgsql-general@postgresql.org
Subject: Block duplications in a shared buffers
Date: Tue, 7 Nov 2017 08:15:03 -0700 (MST)
Message-ID: <1510067703470-0.post@n3.nabble.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: pinker@onet.eu
Subject: Re: Block duplications in a shared buffers
In-Reply-To: <1510067703470-0.post@n3.nabble.com>
References: <1510067703470-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox