Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1754C6B258F for ; Thu, 29 Dec 2011 15:52:35 -0400 (AST) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RgM1h-00029H-Ic for pgsql-bugs@postgresql.org; Thu, 29 Dec 2011 19:52:35 +0000 Received: from [204.145.120.229] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RgM1U-0001sF-OM for pgsql-bugs@postgresql.org; Thu, 29 Dec 2011 19:52:20 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1RgM1U-0002Z1-Em for pgsql-bugs@postgresql.org; Thu, 29 Dec 2011 19:52:20 +0000 Date: Thu, 29 Dec 2011 19:52:20 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6365: Memory leak in insert and update To: pgsql-bugs@postgresql.org From: havasvolgyi.otto@gmail.com X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201112/243 X-Sequence-Number: 32054 The following bug has been logged on the website: Bug reference: 6365 Logged by: Otto Havasv=C3=B6lgyi Email address: havasvolgyi.otto@gmail.com PostgreSQL version: 9.1.2 Operating system: Win XP SP2 x86; Linux Debian 2.6.32 kernel x64 Description: = The bug can be reproduced with pgbench: Insert script: \set nbranches 1*:scale \set ntellers 10*:scale \set naccounts 100000*:scale \setrandom aid 1 :naccounts \setrandom bid 1 :nbranches \setrandom tid 1 :ntellers \setrandom delta -5000 5000 insert into pgbench_history (tid, bid, aid, delta, mtime) values (:tid, :bid, :aid, :delta, current_timestamp); Update script: \set nbranches 1*:scale \set ntellers 10*:scale \set naccounts 100000*:scale \setrandom aid 1 :naccounts \setrandom bid 1 :nbranches \setrandom tid 1 :ntellers \setrandom delta -5000 5000 update pgbench_accounts set abalance =3D abalance + :delta where aid =3D :a= id; Steps: ./pgbench -i -Uotto test ./pgbench -c1 -j1 -T200 -Msimple -N -r -v -f insert.sql -Uotto testdb ./pgbench -c1 -j1 -T200 -Msimple -N -r -v -f update.sql -Uotto testdb During this test a continuous increase of the backend memory comsumption can be observed. During the insert test the increase is quite bigger than during update.