Andres Freund <and...@anarazel.de> writes: > Looking at the size of BTScanOpaqueData I am less surprised: > /* size: 27352, cachelines: 428, members: 17 */ > allocating, zeroing and freeing 28kB of memory for every syscache miss, yea, > that's gonna hurt.
Ouch! I had no idea it had gotten that big. Yeah, we ought to do something about that. > And/or perhaps we could could allocate BTScanOpaqueData.markPos as a whole > only when mark/restore are used? That'd be an easy way of removing about half of the problem, but 14kB is still too much. How badly do we need this items array? Couldn't we just reference the on-page items? regards, tom lane