From: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins |
Date: | 2014-04-09 12:43:29 |
Message-ID: | CABOikdP2=0MXzy-jTo0s2tzZ_UKRhN7m1J=dtZQY=6T-wMNGng@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 9, 2014 at 6:02 PM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:
>
>
> I've tried to reproduce problems around this (when I wrote this), but
> it's really hard to construct cases that need more than 8 pins. I've
> tested performance for those cases by simply not using the array, and
> while the performance suffers a bit, it's not that bad.
>
>
AFAIR this was suggested before and got rejected because constructing that
worst case and proving that the approach does not perform too badly was a
challenge. Having said that, I agree its time to avoid that memory
allocation, especially with large number of backends running with large
shared buffers.
An orthogonal issue I noted is that we never check for overflow in the ref
count itself. While I understand overflowing int32 counter will take a
large number of pins on the same buffer, it can still happen in the worst
case, no ? Or is there a theoretical limit on the number of pins on the
same buffer by a single backend ?
Thanks,
Pavan
--
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-04-09 12:49:28 | Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins |
Previous Message | Andres Freund | 2014-04-09 12:32:33 | Re: [RFC, POC] Don't require a NBuffer sized PrivateRefCount array of local buffer pins |