Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC5dI-00075Y-SO for pgsql-general@arkaria.postgresql.org; Tue, 07 Nov 2017 15:17:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eC5dH-0007ie-QD for pgsql-general@arkaria.postgresql.org; Tue, 07 Nov 2017 15:17:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eC5as-0003OC-Kg for pgsql-general@postgresql.org; Tue, 07 Nov 2017 15:15:14 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC5ai-0005fe-RF for pgsql-general@postgresql.org; Tue, 07 Nov 2017 15:15:13 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 7365194E7562 for ; Tue, 7 Nov 2017 08:15:03 -0700 (MST) Date: Tue, 7 Nov 2017 08:15:03 -0700 (MST) From: pinker To: pgsql-general@postgresql.org Message-ID: <1510067703470-0.post@n3.nabble.com> Subject: Block duplications in a shared buffers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org 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: -- 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