Re: Block duplications in a shared buffers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pinker <pinker(at)onet(dot)eu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Block duplications in a shared buffers
Date: 2017-11-07 15:27:45
Message-ID: 12618.1510068465@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

pinker <pinker(at)onet(dot)eu> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2017-11-07 15:41:09 Re: Naming conventions for column names
Previous Message pinker 2017-11-07 15:15:03 Block duplications in a shared buffers