Re: Postgres cache - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Postgres cache
Date
Msg-id 20191031212454.anroolxucvopgxfz@development
Whole thread Raw
In response to Postgres cache  (Natarajan R <nataraj3098@gmail.com>)
List pgsql-hackers
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 



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Allow superuser to grant passwordless connection rights onpostgres_fdw
Next
From: Ibrar Ahmed
Date:
Subject: Re: The command tag of "ALTER MATERIALIZED VIEW RENAME COLUMN"