PGSQL 11.4: shared_buffers and /dev/shm size

2019-07-09 Thread Konstantin Malanchev
Hello, I'm running PostgreSQL 11.4 on Linux 4.12.14 and I see the following issue while executing single one query: ERROR: could not resize shared memory segment "/PostgreSQL.1596105766" to 536870912 bytes: No space left on device In my postgresql.conf I set sharred_buffers=256MB, I see that i

Re: PGSQL 11.4: shared_buffers and /dev/shm size

2019-07-09 Thread Konstantin Malanchev
unity to enlarge total RAM and probably this query requires too much RAM to execute. Should Postgres just use HDD as temporary storage in this case? Konstantin > On 9 Jul 2019, at 12:53, Jean Louis wrote: > > * Konstantin Malanchev mailto:hom...@gmail.com>> > [2019

Re: PGSQL 11.4: shared_buffers and /dev/shm size

2019-07-09 Thread Konstantin Malanchev
13:51, Thomas Munro wrote: > > On Tue, Jul 9, 2019 at 10:15 PM Jean Louis wrote: >> * Konstantin Malanchev [2019-07-09 12:10]: >>> I have 8 GB RAM and /dev/shm size is 4GB, and there is no significant >>> memory usage by other system processes. I surprised that Pos

Re: PGSQL 11.4: shared_buffers and /dev/shm size

2019-07-09 Thread Konstantin Malanchev
Thank you! > 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). I'm executing the query with smaller work_mem, it will take some time. But I still confused why it used all /dev/shm (4GB) and fails

Re: PGSQL 11.4: shared_buffers and /dev/shm size

2019-07-09 Thread Konstantin Malanchev
> I think it could fail that way for two reasons: /dev/shm size limit > (mount option, which I think you are saying you have set to 4GB?), or > your system ran out of RAM +swap. df /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on shm 4194304 351176 3843128 9% /de