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

pgsql: Avoid memory leak if pgstat_vacuum_stat is interrupted partway

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid memory leak if pgstat_vacuum_stat is interrupted partway
Date: 2009-12-27 19:40:07
Message-ID: 20091227194007.43465753FB7@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Avoid memory leak if pgstat_vacuum_stat is interrupted partway through.
The temporary hash tables made by pgstat_collect_oids should be allocated
in a short-term memory context, which is not the default behavior of
hash_create.  Noted while looking through hash_create calls in connection
with Robert Haas' recent complaint.

This is a pre-existing bug, but it doesn't seem important enough to
back-patch.  The hash table is not so large that it would matter unless this
happened many times within a session, which seems quite unlikely.

Modified Files:
--------------
    pgsql/src/backend/postmaster:
        pgstat.c (r1.193 -> r1.194)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c?r1=1.193&r2=1.194)

pgsql-committers by date

Next:From: User JbcooleyDate: 2009-12-28 02:41:43
Subject: npgsql - Npgsql2: Updated for build 2.0.8
Previous:From: User BmomjianDate: 2009-12-27 19:20:29
Subject: pg-migrator - pg_migrator: Stamp 8.4.7.

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