Re: Bug: Buffer cache is not scan resistant - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug: Buffer cache is not scan resistant
Date
Msg-id 9824.1173086145@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug: Buffer cache is not scan resistant  ("Luke Lonergan" <LLonergan@greenplum.com>)
Responses Re: Bug: Buffer cache is not scan resistant  (Hannu Krosing <hannu@skype.net>)
Re: Bug: Buffer cache is not scan resistant  ("Luke Lonergan" <LLonergan@greenplum.com>)
List pgsql-hackers
"Luke Lonergan" <LLonergan@greenplum.com> writes:
> I think you're missing my/our point:

> The Postgres shared buffer cache algorithm appears to have a bug.  When
> there is a sequential scan the blocks are filling the entire shared
> buffer cache.  This should be "fixed".

No, this is not a bug; it is operating as designed.  The point of the
current bufmgr algorithm is to replace the page least recently used,
and that's what it's doing.

If you want to lobby for changing the algorithm, then you need to
explain why one test case on one platform justifies de-optimizing
for a lot of other cases.  In almost any concurrent-access situation
I think that what you are suggesting would be a dead loss --- for
instance we might as well forget about Jeff Davis' synchronized-scan
work.

In any case, I'm still not convinced that you've identified the problem
correctly, because your explanation makes no sense to me.  How can the
processor's L2 cache improve access to data that it hasn't got yet?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Bug: Buffer cache is not scan resistant
Next
From: Florian Weimer
Date:
Subject: Re: Bug: Buffer cache is not scan resistant