Re: Does RelCache/SysCache shrink except when relations are deleted? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Does RelCache/SysCache shrink except when relations are deleted?
Date
Msg-id 27912.1317306837@sss.pgh.pa.us
Whole thread Raw
In response to Re: Does RelCache/SysCache shrink except when relations are deleted?  ("MauMau" <maumau307@gmail.com>)
Responses Re: Does RelCache/SysCache shrink except when relations are deleted?
List pgsql-hackers
"MauMau" <maumau307@gmail.com> writes:
> Anyway, I'd appreciate if anyone could tell me about RelCache/SysCache. As 
> far as I read the code, PostgreSQL seems to use memory for RelCache/SysCache 
> without limit until the relations are dropped.

That's correct.  We used to have a limit on the size of catcache
(if memory serves, it was something like 5000 entries).  We got rid of
it after observing that performance fell off a cliff as soon as you had
a working set larger than the cache limit.  Trust me, if we had a limit,
you'd still be here complaining, the complaint would just take a
different form ;-)

I concur with Merlin's advice to rethink your schema.  100000 tables is
far beyond what any sane design could require, and is costing you on
many levels (I'm sure the OS and filesystem aren't that happy with it
either).
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Mr. Aaron W. Swenson"
Date:
Subject: Re: pg_upgrade - add config directory setting
Next
From: "Dickson S. Guedes"
Date:
Subject: Re: Feature proposal: www_fdw