handling out of memory conditions when fetching row descriptions

From: "'Isidor Zeuner'" <postgresql(at)quidecco(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: handling out of memory conditions when fetching row descriptions
Date: 2012-01-02 18:27:55
Message-ID: 20120102182755.C2C05812290@quidecco.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi there,

using the latest git source code, I found that libpq will let the
connection stall when getRowDescriptions breaks on an out of memory
condition. I think this should better be handled differently to allow
application code to handle such situations gracefully.

For now, I changed libpq to close the connection when this happens
(please see the attached patch). This approach works fine for me so
far.

Please inform me if there are better ways to handle this.

Thanks.

Best regards,

Isidor Zeuner

Attachment Content-Type Size
row-description-oom.diff text/x-patch 1.3 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hagen Finley 2012-01-02 19:13:28 Adding German Character Set to PostgresSQL
Previous Message Jay Levitt 2012-01-02 16:06:21 Re: 9.1.2: Preventing connections / syncing a database