Re: Query error: could not resize shared memory segment

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Thuc Nguyen Canh <thucnguyencanh(at)gmail(dot)com>
Cc: Forums postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query error: could not resize shared memory segment
Date: 2018-01-03 03:53:16
Message-ID: CAEepm=3xyL+c4GnWpc-55gsfcD0iO5yimOLhXOJb11JDM-LRnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 3, 2018 at 1:22 PM, Thuc Nguyen Canh
<thucnguyencanh(at)gmail(dot)com> wrote:
> I got following error when running some heavy queries
> "ERROR: could not resize shared memory segment "/PostgreSQL.388782411" to
> 50438144 bytes: No space left on device SQL state: 53100"
>
> I'm using a postgis 10 docker container with mounted volume on ubuntu 16
> vps.
>
> Some of failed queries can run after I increased my work_mem.
>
> On the other hand, this issue is not producible on postgresql 9.6.

Hi,

So it couldn't allocate 50MB of dynamic shared memory. Can you show
the work_mem settings, the query plan with the two different work_mem
settings (the one that works and the one that doesn't), the value of
dynamic_shared_memory_type, and tell us how much memory and swap space
you have? Do you run many of these queries in parallel? I guess this
is probably a parallel query using parallel bitmap heapscan and seeing
the error coming from the change in commit
899bd785c0edf376077d3f5d65c316f92c1b64b5, meaning that it would have
risked death by SIGBUS before that commit. What is surprising is that
increasing work_mem helped.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thuc Nguyen Canh 2018-01-03 04:05:21 Re: Query error: could not resize shared memory segment
Previous Message milist ujang 2018-01-03 03:51:51 BDR: remove junk replication identifier