SHMEM_INDEX_SIZE exceeded on startup

Started by Kevin Grittneralmost 15 years ago2 messages
#1Kevin Grittner
Kevin.Grittner@wicourts.gov
1 attachment(s)

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

Attachments:

shmem-index-size.patchtext/plain; name=shmem-index-size.patchDownload
*** 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
#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Kevin Grittner (#1)
Re: SHMEM_INDEX_SIZE exceeded on startup

On 29.03.2011 20:20, Kevin Grittner wrote:

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.

Ok, committed.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com