Re: [GENERAL] ShmemAlloc maximum size

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: [GENERAL] ShmemAlloc maximum size
Дата
Msg-id 20170223195519.GA10384@nol.local
обсуждение исходный текст
Ответ на [GENERAL] ShmemAlloc maximum size  ("hari.prasath" <hari.prasath@zohocorp.com>)
Список pgsql-general
On Thu, Feb 23, 2017 at 08:17:54PM +0530, hari.prasath wrote:
> I am trying to get some 15MB of shared memory using ShmemAlloc.
>
> Cross checked all my kernal variables set in OS level and also in postgresql.conf.
>
> Cant able to get the required memory(15MB) but if i try with some small memory(1MB), its working fine.
>
> Am i missing something.?

Assuming you're talking about some C extension, you have to request in
_PG_INIT() the amount of shmem you'll need, with RequestAddinShmemSpace().

You can see an example in pg_stat_statements.c how it's done (_PG_INIT() and
pgss_shmem_startup()).

Asking a small amount probably works because some shared memory is requested
but not totally used as soon as the server starts.

Regards.

--
Julien Rouhaud
http://dalibo.com - http://dalibo.org


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

Предыдущее
От: Sandeep Thakkar
Дата:
Сообщение: Re: [GENERAL] Building PostgreSQL 9.6devel sources with MicrosoftVisual C++ 2015?
Следующее
От: Moreno Andreo
Дата:
Сообщение: [GENERAL] echo