The following bug has been logged online:
Bug reference: 5302
Logged by: Florian Nigsch
Email address: contact@flo.nigsch.com
PostgreSQL version: 8.4.2
Operating system: x86_64 GNU/Linux 2.6.18-92.el5
Description: WIN1252 encoding causes server memory leak
Details:
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
COMMIT:
Tested on 8.4.0 and 8.4.2. The above code is analogous to that produced by
the PSQLODBC driver.
The leak does not occur without the WIN1252 encoding setting.
http://pgfoundry.org/tracker/index.php?func=detail&aid=1010758&group_id=1000
125&atid=538