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

Commit7f1711f

Browse files
committed
Reduce the default size of the PortalHashTable in order to save a
few cycles during transaction exit. A typical session probablywouldn't have as many as half a dozen portals open at once, so theoriginal value of 64 seems far larger than needed.
1 parent183e8b9 commit7f1711f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.74 2004/10/12 01:50:04 neilc Exp $
15+
* $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.75 2004/11/21 22:48:01 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -26,10 +26,13 @@
2626
#include"utils/portal.h"
2727

2828
/*
29-
* estimate of the maximum number of open portals a user would have,
30-
* used in initially sizing the PortalHashTable in EnablePortalManager()
29+
* Estimate of the maximum number of open portals a user would have,
30+
* used in initially sizing the PortalHashTable in EnablePortalManager().
31+
* Since the hash table can expand, there's no need to make this overly
32+
* generous, and keeping it small avoids unnecessary overhead in the
33+
* hash_seq_search() calls executed during transaction end.
3134
*/
32-
#definePORTALS_PER_USER64
35+
#definePORTALS_PER_USER16
3336

3437

3538
/* ----------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp