Re: PostgreSQL processes use large amount of private memory on Windows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL processes use large amount of private memory on Windows
Дата
Msg-id 146973.1600351567@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL processes use large amount of private memory on Windows  (Øystein Kolsrud <kolsrud@gmail.com>)
Ответы Re: PostgreSQL processes use large amount of private memory on Windows  (raf <raf@raf.org>)
Re: PostgreSQL processes use large amount of private memory on Windows  (Chris Sterritt <chris.sterritt@yobota.xyz>)
Список pgsql-general
=?UTF-8?Q?=C3=98ystein_Kolsrud?= <kolsrud@gmail.com> writes:
> So my question is: When does a postgres process forked for a connection use
> private memory instead of shared, and what can I do to avoid this?

The only significant long-term consumption of private memory is for
caches.  There are catalog caches, which can get large if the session
accesses a whole lot of database objects (e.g., thousands of different
tables).  Some of the PLs maintain caches with parsed versions of any
function that's been executed.  (An ex-employer of mine had a lot of
trouble in that regard, because they had hundreds of thousands of lines
worth of plpgsql functions.)  There isn't any user-accessible knob for
limiting the size of those caches.  If you have a problem of that sort,
about the only way to mitigate it is to use fewer backends so that the
total memory consumption stays in bounds, or redesign your application.
In some cases it might help to restart your sessions when they get too
big, but that seems like at best a band-aid.

            regards, tom lane



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

Предыдущее
От: Ravi Krishna
Дата:
Сообщение: Re: Obvious data mismatch in View2 which basically SELECT * from View1
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: Obvious data mismatch in View2 which basically SELECT * from View1