Re: Does RelCache/SysCache shrink except when relations are deleted?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "MauMau" <maumau307(at)gmail(dot)com>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Pg Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Does RelCache/SysCache shrink except when relations are deleted?
Date: 2011-09-29 14:33:57
Message-ID: 27912.1317306837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"MauMau" <maumau307(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dickson S. Guedes 2011-09-29 14:43:02 Re: Feature proposal: www_fdw
Previous Message Mr. Aaron W. Swenson 2011-09-29 14:31:27 Re: pg_upgrade - add config directory setting