aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-06-04 22:57:22 +0000
committerBruce Momjian <bruce@momjian.us>2005-06-04 22:57:22 +0000
commit24af7d4b68ea5cf08c458ffb00fffacc8c6b7d2c (patch)
treedde9346f72c7a9909962ccc56014e5cab2496c36 /src
parent954108f92d5477a4527380c9f867bc9401880975 (diff)
downloadpostgresql-24af7d4b68ea5cf08c458ffb00fffacc8c6b7d2c.tar.gz
postgresql-24af7d4b68ea5cf08c458ffb00fffacc8c6b7d2c.zip
Back out patch:
--------------------------------------------------------------------------- Tom Lane <tgl@sss.pgh.pa.us> writes: > a_ogawa <a_ogawa@hi-ho.ne.jp> writes: > > It is a reasonable idea. However, the majority part of MemSet was not > > able to be avoided by this idea. Because the per-tuple contexts are used > > at the early stage of executor. > > Drat. Well, what about changing that? We could introduce additional > contexts or change the startup behavior so that the ones that are > frequently reset don't have any data in them unless you are working > with pass-by-ref values inside the inner loop. That might be possible. However, I think that we should change only aset.c about this article. I thought further: We can check whether context was used from the last reset even when blocks list is not empty. Please see attached patch.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/mmgr/aset.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index f7550929f1f..de56a2dc010 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.61 2005/06/04 20:14:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.62 2005/06/04 22:57:22 momjian Exp $
*
* NOTE:
* This is a new (Feb. 05, 1999) implementation of the allocation set
@@ -399,17 +399,6 @@ AllocSetReset(MemoryContext context)
if (block == NULL)
return;
- /*
- * When blocks list has only "keeper" block and freeptr of the block
- * is initial value, the context is not used from last reset.
- */
- if (block == set->keeper && block->next == NULL)
- {
- char *datastart = ((char *) block) + ALLOC_BLOCKHDRSZ;
- if (block->freeptr == datastart)
- return;
- }
-
/* Clear chunk freelists */
MemSetAligned(set->freelist, 0, sizeof(set->freelist));