From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: heap vacuum & cleanup locks |
Date: | 2011-11-10 02:10:25 |
Message-ID: | CA+TgmoZdzRKPdhWKefCy_UfxQm2u_wZt6iZDuBAOoAuqGE3mdw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 9, 2011 at 6:10 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On Wed, Nov 9, 2011 at 10:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
>>> heapgetpage() gets a page and a pin, but holds the pin until it reads
>>> the next page. Wow!
>>
>>> That is both annoying and very dumb. It should hold the pin long
>>> enough to copy the data and then release the pin.
>>
>> I don't find that anywhere near as obvious as you seem to. I think you
>> are trying to optimize for the wrong set of conditions.
>
> ISTM we should optimise to access the cachelines in the buffer once.
> Holding a pin and re-accessing the buffer via main memory seems pretty
> bad plan to me. Which conditions are being optimised by doing that?
I believe it reduces memory copying. But we can certainly test some
alternative you may have in mind and see how it shakes out.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-11-10 02:12:13 | Re: 9.1.2 ? |
Previous Message | Robert Haas | 2011-11-10 02:09:32 | Re: heap vacuum & cleanup locks |