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 04:43:16
Message-ID: CAEepm=188GMLQPh+r0MvU9Jc8Mq6qboXiRd0m1yVmPRRBXqLDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jan 3, 2018 at 5:22 PM, Thuc Nguyen Canh
<thucnguyencanh(at)gmail(dot)com> wrote:
> Here is the query plan of a query that causes above issue for any
> random_page_cost < 3 (I keep the work_mem by default)
>
> 'Sort (cost=9441498.11..9542397.83 rows=40359886 width=64) (actual
> time=33586.588..33586.590 rows=4 loops=1)'

I guess that must be EXPLAIN ANALYZE, because it includes "actual"
time, so it must be the plan when you set random_page_code >= 3,
right? Otherwise it would raise the error. Can you now set it to <
3 and do just EXPLAIN (no ANALYZE) so that we can see the failing plan
without trying to run it? I'm guessing it's different, because the
plan you showed doesn't look like it would want 50MB of DSM.

--
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:49:39 Re: Query error: could not resize shared memory segment
Previous Message Tom Lane 2018-01-03 04:39:50 Re: Query error: could not resize shared memory segment