@@ -1119,7 +1119,7 @@ InitPredicateLocks(void)
1119
1119
1120
1120
SHMQueueInit (& RWConflictPool -> availableList );
1121
1121
requestSize = mul_size ((Size )max_table_size ,
1122
- PredXactListElementDataSize );
1122
+ RWConflictDataSize );
1123
1123
RWConflictPool -> element = ShmemAlloc (requestSize );
1124
1124
if (RWConflictPool -> element == NULL )
1125
1125
ereport (ERROR ,
@@ -1190,11 +1190,17 @@ PredicateLockShmemSize(void)
1190
1190
size = add_size (size ,hash_estimate_size (max_table_size ,
1191
1191
sizeof (SERIALIZABLEXID )));
1192
1192
1193
+ /* rw-conflict pool */
1194
+ max_table_size *=5 ;
1195
+ size = add_size (size ,RWConflictPoolHeaderDataSize );
1196
+ size = add_size (size ,mul_size ((Size )max_table_size ,
1197
+ RWConflictDataSize ));
1198
+
1193
1199
/* Head for list of finished serializable transactions. */
1194
1200
size = add_size (size ,sizeof (SHM_QUEUE ));
1195
1201
1196
1202
/* Shared memory structures for SLRU tracking of old committed xids. */
1197
- size = add_size (size ,sizeof (OldSerXidControl ));
1203
+ size = add_size (size ,sizeof (OldSerXidControlData ));
1198
1204
size = add_size (size ,SimpleLruShmemSize (NUM_OLDSERXID_BUFFERS ,0 ));
1199
1205
1200
1206
return size ;