Re: BUG #15225: [XX000] ERROR: invalid DSA memory alloc request size 1073741824 / Where: parallel worker

Thomas Munro <thomas.munro@enterprisedb.com>

From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Frits Jalvingh <jal@etc.to>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2018-06-09T05:06:05Z
Lists: pgsql-bugs

Attachments

On Thu, Jun 7, 2018 at 1:00 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
>> ERROR: invalid DSA memory alloc request size 1073741824
>
> Here is a proposed fix

Here is a tidier version that I'd like to commit before beta2, if
there are no objections.  I've added this to the PostgreSQL 11 open
items page.  Here's a simple way to reach the error with default
settings in unpatched master (given enough memory and disk):

create table foo (i int);
insert into foo select generate_series(1, 128000000);
set work_mem = '2GB';
select count(*) from foo f1 join foo f2 using (i);

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

Commits

  1. Limit Parallel Hash's bucket array to MaxAllocSize.

  2. Allow for parallel execution whenever ExecutorRun() is done only once.