Re: BUG #5302: WIN1252 encoding causes server memory leak - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5302: WIN1252 encoding causes server memory leak
Date
Msg-id 7612.1264882382@sss.pgh.pa.us
Whole thread Raw
In response to BUG #5302: WIN1252 encoding causes server memory leak  ("Florian Nigsch" <contact@flo.nigsch.com>)
List pgsql-bugs
"Florian Nigsch" <contact@flo.nigsch.com> writes:
> The following rapidly consumes server memory:

> -- Causes leak:
> SET client_encoding TO 'WIN1252';

> BEGIN;
> CREATE TEMP TABLE t1(pk INT PRIMARY KEY);

> -- Repeat 1000 times
> DECLARE mycur CURSOR WITH HOLD FOR SELECT * FROM t1;
> FETCH 100 IN mycur;
> SAVEPOINT mysp;
> CLOSE mycur;
> RELEASE mysp;
> -- End repeat

I've applied a patch for this, but I have to say that using a SAVEPOINT
around a CLOSE is an awfully expensive use of a savepoint.  You might
want to nag the psqlodbc people to see if they can't avoid that.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #5303: Upgrade failure due to sever.key permissions
Next
From: Steve White
Date:
Subject: Re: BUG #5272: PL/Python SELECT: return composite fields as dict, not str