I doubt that this is going to matter much, and should only have a
trivial impact on shared space calculations and postmaster and
connection startup time, but just as a matter of principle we might
want to set SHMEM_INDEX_SIZE at least as large as the number of
entries in ShmemIndex.  At startup that seems to be 40 as of current
HEAD.
 
Trivial patch attached.
 
-Kevin

*** a/src/include/storage/shmem.h
--- b/src/include/storage/shmem.h
***************
*** 50,56 **** extern void RequestAddinShmemSpace(Size size);
   /* max size of data structure string name */
  #define SHMEM_INDEX_KEYSIZE            (48)
   /* estimated size of the shmem index table (not a hard limit) */
! #define SHMEM_INDEX_SIZE               (32)
  
  /* this is a hash bucket in the shmem index table */
  typedef struct
--- 50,56 ----
   /* max size of data structure string name */
  #define SHMEM_INDEX_KEYSIZE            (48)
   /* estimated size of the shmem index table (not a hard limit) */
! #define SHMEM_INDEX_SIZE               (64)
  
  /* this is a hash bucket in the shmem index table */
  typedef struct
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to