David Rowley <dgrowle...@gmail.com> writes: > GenerationRealloc: uses "size" to figure out if the new size is > smaller than the old size. Maybe we could just always move to a new > chunk regardless of if the new size is smaller or larger than the old > size.
I had the same idea ... but we need to know the old size to know how much to copy. > GenerationGetChunkSpace: Uses "size" to figure out the amount of > memory is used by the chunk. I'm not sure how we'd work around the > fact that USEMEM() uses that extensively in tuplesort.c to figure out > how much memory we're using. Ugh, that seems like a killer. regards, tom lane