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

Поиск
Список
Период
Сортировка
От MauMau
Тема Re: Does RelCache/SysCache shrink except when relations are deleted?
Дата
Msg-id E42C0ACB68784EAD87F08551E7B7E8C7@maumau
обсуждение исходный текст
Ответ на Re: Does RelCache/SysCache shrink except when relations are deleted?  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: Does RelCache/SysCache shrink except when relations are deleted?
Re: Does RelCache/SysCache shrink except when relations are deleted?
Список pgsql-hackers
From: "Merlin Moncure" <mmoncure@gmail.com>
can we see all of your memory settings plus physical memory?  the
solution is probably going to be reducing shared buffers an/or adding
physical memory.

Thank you for your response.

The amount of physical memory is 8GB, which is enough for the workload. I 
asked the customer for the output of "SHOW ALL", but I haven't received it 
yet. However, shared_buffers should be less than 1.6GB because, as I wrote 
in the previous mail, top command showed 1.6GB in "VIRT" column before 
executing somefunc() PL/pgSQL function.

The direct cause of "out of memory" is that the virtual memory became full. 
32-bit Linux can allocate 3GB of user space in the virtual address space of 
each process. somefunc() used 1.0GB, which led to 2.6GB of virtual memory. 
After somefunc(), VACUUM tried to allocate 256MB of maintenance_work_mem. 
That allocation failed because the virtual address space was almost full.

As you mentioned, decreasing shared_buffers will be one of the solutions. 
However, we want to know why somefunc() uses so much memory. Therefore, the 
following is the core question. Q2 and Q3 are supplementary ones. It is just 
my guess that RelCache/SysCache may be the cause.

2011/9/28 MauMau <maumau307@gmail.com>:
> Q1: When are the RelCache/SysCache entries removed from 
> CacheMemoryContext?
> Are they removed only when the corresponding relations are deleted? If so,
> "many tables and indexes" is not friendly for the current PostgreSQL?

Regards
MauMau



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: [REVIEW] pg_last_xact_insert_timestamp
Следующее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: Feature proposal: www_fdw