Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Patch applied. Thanks. (The first if == NULL test was already in CVS).
>
> The first if == NULL test was the only part I wanted to apply ...
> I do not think this patch is a performance win in general.
Attached is the part I backed out of CVS.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: aset.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -c -c -r1.60 -r1.61
*** aset.c 14 May 2005 20:29:13 -0000 1.60
--- aset.c 4 Jun 2005 20:14:12 -0000 1.61
***************
*** 399,404 ****
--- 399,415 ----
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));