Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eC5pZ-00080o-QI for pgsql-general@arkaria.postgresql.org; Tue, 07 Nov 2017 15:30:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eC5pZ-0000Zu-88 for pgsql-general@arkaria.postgresql.org; Tue, 07 Nov 2017 15:30:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eC5n9-0004dx-Fn for pgsql-general@postgresql.org; Tue, 07 Nov 2017 15:27:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eC5n6-0005yI-Fs for pgsql-general@postgresql.org; Tue, 07 Nov 2017 15:27:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vA7FRjg3012619; Tue, 7 Nov 2017 10:27:45 -0500 From: Tom Lane To: pinker cc: pgsql-general@postgresql.org Subject: Re: Block duplications in a shared buffers In-reply-to: <1510067703470-0.post@n3.nabble.com> References: <1510067703470-0.post@n3.nabble.com> Comments: In-reply-to pinker message dated "Tue, 07 Nov 2017 08:15:03 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12617.1510068465.1@sss.pgh.pa.us> Date: Tue, 07 Nov 2017 10:27:45 -0500 Message-ID: <12618.1510068465@sss.pgh.pa.us> 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 pinker writes: > I was analysing shared buffers content and noticed that exactly the same > disk block appears there many times with different or the same usagecount. Postgres would be completely broken if that were true, because modifications made to one copy would fail to propagate to other copies. I don't know where your data came from, but it can't be an accurate representation of the instantaneous state of the buffer cache. ... actually, after looking at your query, I wonder whether the issue is that you're failing to include database and tablespace in the grouping key. relfilenode isn't guaranteed unique across directories. The fork number can matter, too. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general