Re: [GENERAL] PostgreSQL backend process high memory usage issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] PostgreSQL backend process high memory usage issue
Дата
Msg-id 26138.1302672583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] PostgreSQL backend process high memory usage issue  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: [GENERAL] PostgreSQL backend process high memory usage issue  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-bugs
Merlin Moncure <mmoncure@gmail.com> writes:
> I think you may have uncovered a leak (I stand corrected).

> The number of schemas in your test is irrelevant -- the leak is
> happening in proportion to the number of views (set via \setrandom
> tidx 1 10).  At 1 I don't think it exists at all -- at 100 memory use
> grows very fast.

I don't think it's a leak, exactly: it's just that the "relcache" entry
for each one of these views occupies about 100K.  A backend that touches
N of the views is going to need about N*100K in relcache space.  I can't
get terribly excited about that.  Trying to reduce the size of the
relcache would be a net loss for most usage patterns (ie, we'd end up
increasing the amount of re-fetching from the system catalogs that
backends would have to do).  And I don't think that this test case has
much of anything to do with sane application design, anyway.  Do you
really need that many complex views?  Do you really need to have most
sessions touching all of them?

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Vlad Arkhipov"
Дата:
Сообщение: BUG #5976: Corrupted pages on the production database
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #5976: Corrupted pages on the production database