1
0
mirror of https://github.com/postgres/postgres.git synced 2026-01-26 09:41:40 +03:00
Files
postgres/src/backend
Andres Freund 30df61990c bufmgr: Add one-entry cache for private refcount
The private refcount entry for a buffer is often looked up repeatedly for the
same buffer, e.g. to pin and then unpin a buffer. Benchmarking shows that it's
worthwhile to have a one-entry cache for that case. With that cache in place,
it's worth splitting GetPrivateRefCountEntry() into a small inline
portion (for the cache hit case) and an out-of-line helper for the rest.

This is helpful for some workloads today, but becomes more important in an
upcoming patch that will utilize the private refcount infrastructure to also
store whether the buffer is currently locked, as that increases the rate of
lookups substantially.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/6rgb2nvhyvnszz4ul3wfzlf5rheb2kkwrglthnna7qhe24onwr@vw27225tkyar
2025-12-14 13:09:43 -05:00
..
2025-01-01 11:21:55 -05:00
2025-12-11 15:13:04 -06:00
2025-05-05 12:04:49 +02:00
2025-12-02 10:09:32 +01:00
2025-12-11 15:13:04 -06:00
2025-03-26 19:45:32 -04:00