Re: PGSQL 11.4: shared_buffers and /dev/shm size
От | Thomas Munro |
---|---|
Тема | Re: PGSQL 11.4: shared_buffers and /dev/shm size |
Дата | |
Msg-id | CA+hUKGJJPpOcCX946DEFr+uTf4KO22k=ppBL=9BHi=CyL_=unQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PGSQL 11.4: shared_buffers and /dev/shm size (Konstantin Malanchev <hombit@gmail.com>) |
Ответы |
Re: PGSQL 11.4: shared_buffers and /dev/shm size
|
Список | pgsql-general |
On Tue, Jul 9, 2019 at 11:11 PM Konstantin Malanchev <hombit@gmail.com> wrote: > Thank you for explanation. work_mem = 512MB and max_parallel_workers_per_gather = 2 and I run only one Postgres instanceand only one query. EXPLAIN shows "Workers Planned: 2" for this query. Why it can use more than 1GB of /dev/shm? For example, if you have one Parallel Hash Join in your plan, it could allocate up to 512MB * 3 of shared memory (3 = leader process + 2 workers). It sounds like you'll need to set work_mem smaller. If you run EXPLAIN ANALYZE you'll see how much memory is used by individual operations. Usually it's regular private anonymous memory, but for Parallel Hash it's /dev/shm memory. -- Thomas Munro https://enterprisedb.com
В списке pgsql-general по дате отправления: