On Thu, Oct 31, 2019 at 03:19:23PM +0530, Natarajan R wrote:
>Hi,
>
>I want to know how postgres stores catalog relations in cache in-depth. Is
>there any documentation for that?
Not sure what exactly you mean by "cache" - whether shared buffers (as a
shared general database cache) or syscache/catcache, i.e. the special
cache of catalog records each backend maintains privately.
I'm not aware of exhaustive developer docs explaining these parts, but
for shared buffers you might want to look at
src/backend/storage/buffer/README
while for catcache/syscache you probably need to look at the code and
comments in the related files, particularly in
src/backend/utils/cache/syscache.c
src/backend/utils/cache/relcache.c
Not sure if there's a better source of information :-(
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services