diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-21 22:48:01 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-11-21 22:48:01 +0000 |
commit | 7f1711f29dd6e44753d5845f707bda5fac6166a0 (patch) | |
tree | 4020e0284889bc5d775023d46d637c115b10edc2 | |
parent | 183e8b911c452de056fe8d355017c9edd1ee3c74 (diff) | |
download | postgresql-7f1711f29dd6e44753d5845f707bda5fac6166a0.tar.gz postgresql-7f1711f29dd6e44753d5845f707bda5fac6166a0.zip |
Reduce the default size of the PortalHashTable in order to save a
few cycles during transaction exit. A typical session probably
wouldn't have as many as half a dozen portals open at once, so the
original value of 64 seems far larger than needed.
-rw-r--r-- | src/backend/utils/mmgr/portalmem.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 23afef4f41f..e7fa2cdd186 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -12,7 +12,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.74 2004/10/12 01:50:04 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/utils/mmgr/portalmem.c,v 1.75 2004/11/21 22:48:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,10 +26,13 @@ #include "utils/portal.h" /* - * estimate of the maximum number of open portals a user would have, - * used in initially sizing the PortalHashTable in EnablePortalManager() + * Estimate of the maximum number of open portals a user would have, + * used in initially sizing the PortalHashTable in EnablePortalManager(). + * Since the hash table can expand, there's no need to make this overly + * generous, and keeping it small avoids unnecessary overhead in the + * hash_seq_search() calls executed during transaction end. */ -#define PORTALS_PER_USER 64 +#define PORTALS_PER_USER 16 /* ---------------- |