Greenplum 6.30.0 causes queries to fail with "insufficient memory reserved for statement"
search cancel

Greenplum 6.30.0 causes queries to fail with "insufficient memory reserved for statement"

book

Article ID: 409101

calendar_today

Updated On:

Products

VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire VMware Tanzu Data Suite VMware Tanzu Data Suite

Issue/Introduction

There is a common case where clients using extended query pipeline mode will bypass resource group assignment, including all subsequent queries for that session.

This can result in queries that previously ran successfully on versions prior to 6.30 to fail with the following error message:

ERROR: insufficient memory reserved for statement (execHHashagg.c:845) 

 

Cause

This is caused by an unintended issue in Greenplum 6, where client applications using ODBC/JDBC would be using the extended libpq protocol to communicate with GPDB. For the extended libpq protocol, our RG code does not handle it effectively, and it allocates the wrong memory for ODBC/JDBC queries.

The client applications using extended query pipelining mode were bypassing resource group assignment for all statements if the first statement was a SET or SHOW command. When a client is using pipelining, it doesn't wait for a response from the server before sending the next statement. 

The common case is a client using this mode running SET role as the very first statement after connecting and because SET commands always bypassed resource group assignment, all subsequent statements for that session did also. This is not intended.

 

Resolution

Upgrade to Greenplum 6.30.1 or above