Skip site navigation (1) Skip section navigation (2)

Re: BUG #5302: WIN1252 encoding causes server memory leak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Florian Nigsch" <contact(at)flo(dot)nigsch(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5302: WIN1252 encoding causes server memory leak
Date: 2010-01-30 20:13:02
Message-ID: 7612.1264882382@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Florian Nigsch" <contact(at)flo(dot)nigsch(dot)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

In response to

pgsql-bugs by date

Next:From: Steve WhiteDate: 2010-01-31 12:20:25
Subject: Re: BUG #5272: PL/Python SELECT: return composite fields as dict, not str
Previous:From: Craig RingerDate: 2010-01-30 05:43:52
Subject: Re: BUG #5303: Upgrade failure due to sever.key permissions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group