pgsql: Change hashscan.c to keep its list of active hash index scans in

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change hashscan.c to keep its list of active hash index scans in
Date: 2008-03-07 15:59:31
Message-ID: 20080307155931.D7846753F32@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Change hashscan.c to keep its list of active hash index scans in
TopMemoryContext, rather than scattered through executor per-query contexts.
This poses no danger of memory leak since the ResourceOwner mechanism
guarantees release of no-longer-needed items. It is needed because the
per-query context might already be released by the time we try to clean up
the hash scan list. Report by ykhuang, diagnosis by Heikki.

Back-patch to 8.0, where the ResourceOwner-based cleanup was introduced.
The given test case does not fail before 8.2, probably because we rearranged
transaction abort processing somehow; but this coding is undoubtedly risky
so I'll patch 8.0 and 8.1 anyway.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/backend/access/hash:
hashscan.c (r1.38 -> r1.38.4.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashscan.c?r1=1.38&r2=1.38.4.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2008-03-07 17:54:15 pgsql: Add: > o Add SQLSTATE severity to PGconn return status > >
Previous Message Tom Lane 2008-03-07 15:59:24 pgsql: Change hashscan.c to keep its list of active hash index scans in