Skip to content

Commit e8aa10e

Browse files
committed
ShmemInitHash forgot to specify HASH_ALLOC flag bit in its hash_create
call. You'd think this would cause some problems, but because of the way hash_create is coded, the only side-effect was creation of a useless memory context for the hashtable.
1 parent ea43da5 commit e8aa10e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/storage/ipc/shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/ipc/shmem.c,v 1.76 2003/12/21 04:30:10 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/ipc/shmem.c,v 1.77 2003/12/30 00:03:03 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -281,7 +281,7 @@ ShmemInitHash(const char *name, /* table string name for shmem index */
281281
*/
282282
infoP->dsize = infoP->max_dsize = hash_select_dirsize(max_size);
283283
infoP->alloc = ShmemAlloc;
284-
hash_flags |= HASH_SHARED_MEM | HASH_DIRSIZE;
284+
hash_flags |= HASH_SHARED_MEM | HASH_ALLOC | HASH_DIRSIZE;
285285

286286
/* look it up in the shmem index */
287287
location = ShmemInitStruct(name,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy