pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: digoal@126.com
Subject: BUG #15320: = any (array(SQL)) ERROR: invalid memory alloc request size 1073741824
Date: Fri, 10 Aug 2018 02:00:56 +0000
Message-ID: <153386645615.1296.15033397940289482159@wrigleys.postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15320
Logged by:          Zhou Digoal
Email address:      digoal@126.com
PostgreSQL version: 11beta2
Operating system:   CentOS 7.x x64
Description:        

the error is:

```
create table tbl (uid int8 primary key, pid int8);
insert into tbl select generate_series(1,100000000), random()*100000;

postgres=# explain select count(*) from tbl where uid = any (array(select
uid from tbl limit 100000000))    ;
                                     QUERY PLAN                             
        
-------------------------------------------------------------------------------------
 Aggregate  (cost=1635653.23..1635653.24 rows=1 width=8)
   InitPlan 1 (returns $0)
     ->  Limit  (cost=0.00..1635635.23 rows=100000000 width=8)
           ->  Seq Scan on tbl tbl_1  (cost=0.00..2289638.88 rows=139984688
width=8)
   ->  Index Only Scan using pk on tbl  (cost=0.57..17.98 rows=10 width=0)
         Index Cond: (uid = ANY ($0))
(6 rows)

postgres=# explain analyze select count(*) from tbl where uid = any
(array(select uid from tbl limit 100000000))    ;
ERROR:  XX000: invalid memory alloc request size 1073741824
LOCATION:  repalloc, mcxt.c:1050
Time: 24133.852 ms (00:24.134)
```

is it a bug?
thanks, 
best regards. 
digoal



view thread (2+ messages)  latest in thread

Message-ID: <153386645615.1296.15033397940289482159@wrigleys.postgresql.org>
Permalink:  ../153386645615.1296.15033397940289482159@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/153386645615.1296.15033397940289482159@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, digoal@126.com
  Subject: Re: BUG #15320: = any (array(SQL)) ERROR: invalid memory alloc request size 1073741824
  In-Reply-To: <153386645615.1296.15033397940289482159@wrigleys.postgresql.org>
  References: <153386645615.1296.15033397940289482159@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox