Greg Stark <st...@mit.edu> writes: > I'm still skeptical about the idea of a "freelist". That just seems like a > terrible point of contention. However perhaps that's because I'm picturing > an LRU linked list. Perhaps the right thing is to maintain a pool of > buffers in some less contention-prone data structure which lets each > backend pick buffers out more or less independently of the others.
I think the original vision of the clock sweep algorithm included the idea that different backends could be running the sweep over different parts of the buffer ring concurrently. If we could get rid of the need to serialize that activity, it'd pretty much eliminate the bottleneck I should think. The problem is how to manage it to ensure that (a) backends aren't actually contending on the same buffers as they do this, and (b) there's a reasonably fair rate of usage_count decrements for each buffer, rather than possibly everybody ganging up on the same area sometimes. Thoughts? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers