Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit24af7d4

Browse files
committed
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 onlyaset.c about this article.I thought further: We can check whether context was used from the lastreset even when blocks list is not empty. Please see attached patch.
1 parent954108f commit24af7d4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

‎src/backend/utils/mmgr/aset.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.61 2005/06/0420:14:12 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/aset.c,v 1.62 2005/06/0422:57:22 momjian Exp $
1515
*
1616
* NOTE:
1717
*This is a new (Feb. 05, 1999) implementation of the allocation set
@@ -399,17 +399,6 @@ AllocSetReset(MemoryContext context)
399399
if (block==NULL)
400400
return;
401401

402-
/*
403-
* When blocks list has only "keeper" block and freeptr of the block
404-
* is initial value, the context is not used from last reset.
405-
*/
406-
if (block==set->keeper&&block->next==NULL)
407-
{
408-
char*datastart= ((char*)block)+ALLOC_BLOCKHDRSZ;
409-
if (block->freeptr==datastart)
410-
return;
411-
}
412-
413402
/* Clear chunk freelists */
414403
MemSetAligned(set->freelist,0,sizeof(set->freelist));
415404

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp