ssi-shmemsize.patch

text/plain

Filename: ssi-shmemsize.patch
Type: text/plain
Part: 0
Message: Re: SSI patch version 14

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/storage/lmgr/predicate.c 6 0
*** a/src/backend/storage/lmgr/predicate.c
--- b/src/backend/storage/lmgr/predicate.c
***************
*** 1190,1200 **** PredicateLockShmemSize(void)
  	size = add_size(size, hash_estimate_size(max_table_size,
  											 sizeof(SERIALIZABLEXID)));
  
  	/* Head for list of finished serializable transactions. */
  	size = add_size(size, sizeof(SHM_QUEUE));
  
  	/* Shared memory structures for SLRU tracking of old committed xids. */
! 	size = add_size(size, sizeof(OldSerXidControl));
  	size = add_size(size, SimpleLruShmemSize(NUM_OLDSERXID_BUFFERS, 0));
  
  	return size;
--- 1190,1205 ----
  	size = add_size(size, hash_estimate_size(max_table_size,
  											 sizeof(SERIALIZABLEXID)));
  
+ 	/* rw-conflict pool */
+ 	size = add_size(size, RWConflictPoolHeaderDataSize);
+ 	size = add_size(size, mul_size((Size) max_table_size,
+ 								   RWConflictDataSize));
+ 
  	/* Head for list of finished serializable transactions. */
  	size = add_size(size, sizeof(SHM_QUEUE));
  
  	/* Shared memory structures for SLRU tracking of old committed xids. */
! 	size = add_size(size, sizeof(OldSerXidControlData));
  	size = add_size(size, SimpleLruShmemSize(NUM_OLDSERXID_BUFFERS, 0));
  
  	return size;