From: | Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | memory leaks? using savepoint |
Date: | 2010-12-16 07:11:14 |
Message-ID: | 4D09BB92.6080309@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi!
When I tested simple query as following, backend process used much memory
and not freed until the backend was finished.
# This is reproduced on PostgreSQL8.3 (PostgreSQL8.3.6 - PostgreSQL8.3.12)
-------
BEGIN;
SAVEPOINT sp0;
INSERT INTO tbl VALUES (1);
RELEASE sp0;
SAVEPOINT sp1;
INSERT INTO tbl VALUES (1);
RELEASE sp1;
(repeats 10k)
ROLLBACK;
SELECT pg_sleep(10000);
-------
I think this caused by following fix.
http://archives.postgresql.org/pgsql-committers/2008-12/msg00100.php
http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.560&r2=1.561)
Should "CopySnapshot()" be performed in MessageContext ?
Attached simple pathch to solve it...
Best regards,
--
NTT OSS Center
Tatsuhito Kasahara
kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp
Attachment | Content-Type | Size |
---|---|---|
test20101216.patch | text/plain | 915 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Mariana Chigir | 2010-12-16 08:44:08 | Urgent inquiry |
Previous Message | Rajesh Sundar | 2010-12-16 06:03:22 | pgAgent JobScheduler not running jobs |