pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <david.rowley@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: andreas-postgresql@creative-memory.de
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13633: ERROR: invalid memory alloc request size
Date: Wed, 23 Sep 2015 10:57:25 +1200
Message-ID: <CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com> (raw)
In-Reply-To: <9088.1442940520@sss.pgh.pa.us>
References: <20150922145249.5058.98379@wrigleys.postgresql.org>
	<9088.1442940520@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 23 September 2015 at 04:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> andreas-postgresql@creative-memory.de writes:
> > SELECT G.MarkerID,G.Allel1,G.Allel2, count (G.TierLIDint) as nH
> >   FROM GenotypHD as G, TiereInSets as TS, Marker as M
> >     WHERE TS.TierSetID='HD.09.15' and TS.TierLIDint=G.TierLIDint and
> > M.Version='3' and M.MarkerID=G.MarkerID and G.Allel1<>G.Allel2
> >     GROUP BY G.MarkerID,G.Allel1,G.Allel2;
>
> > ERROR:  invalid memory alloc request size 1073741824
>
> FWIW, I could not reproduce this on the basis of the supplied information,
> ie just creating the tables and running this query does not do anything
> surprising.  It looks like possibly a corrupt-data issue --- can you do
> "select * from" each table without problems?
>
>
This seems related to this
http://www.postgresql.org/message-id/9A28C8860F777E439AA12E8AEA7694F8010F6F3F@BPXM15GP.gisp.nec.co.j...

work_mem, I believe, must be higher than 1GB to trigger this.

The patch attached to that thread has a bug in the following line

+ memset(hashtable->buckets, 0, sizeof(nbuckets * sizeof(HashJoinTuple)));

It should be:

+ memset(hashtable->buckets, 0, nbuckets * sizeof(HashJoinTuple));

Regards

David Rowley

--
 David Rowley                   http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/;
 PostgreSQL Development, 24x7 Support, Training & Services

view thread (9+ messages)  latest in thread

Message-ID: <CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com>
Permalink:  ../CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com

 · 

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: david.rowley@2ndquadrant.com, tgl@sss.pgh.pa.us, andreas-postgresql@creative-memory.de
  Subject: Re: BUG #13633: ERROR: invalid memory alloc request size
  In-Reply-To: <CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com>
  References: <20150922145249.5058.98379@wrigleys.postgresql.org> <9088.1442940520@sss.pgh.pa.us> <CAKJS1f_sxPyBHF6=nEYwPJdKKDNjVDP91b_EJApfyGTei=ViDw@mail.gmail.com>

* 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