Postgresql – Could not resize shared memory segment error

postgresqlpostgresql-11

I have a PostgreSQL 11.2 (Debian 11.2-1.pgdg90+1) running in a docker container.

I get the following error with some queries:

could not resize shared memory segment "/PostgreSQL.860708388" to 536870912 bytes: No space left on device`

system:

  • Ubuntu 18.04.5
  • memory: 126 GB
  • cores: 64

disk usage is fine, as well as quotas.

Postgres settings:

  • work_mem: 30GB,
  • dynamic_shared_memory_type: posix
  • max_parallel_workers_per_gather: 32

Best Answer

Lowering number on max_parallel_workers_per_gather to 8 seems to have fixed the problem in my case.