Greg Stark wrote: > I doubt pinning buffers ever improve system on any halfway modern system. It > will often *look* like it has improved performance because it improves the > performance of the queries you're looking at -- but at the expense of > slowing down everything else. > > There is a use case it would be useful for though. When you have some > queries that are latency critical. Then you might want to pin the buffers > those queries use to avoid having larger less urgent queries purge those > buffers. > > If we had a way to mark latency critical queries that might be a more > flexible interface but ewe would need some way to control just how critical > they are. we wouldn't want to keep those buffets pinned forever. This should be easy to test, no? Just set some variable while running latency-critical queries that makes PinBuffer increment usage_count by more than one when pinning a buffer. Such a buffer would have its usage count typically higher than a buffer only used for regular queries. To make this work we'd probably need a slightly larger value of BM_MAX_USAGE_COUNT, I think. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general