> Thanks for reporting. I can reproduce this memory invalid access on HEAD. > After debuging codes, I found the root cause. > In DetachPartitionFinalize(), below code: > att = TupleDescAttr(RelationGetDescr(partRel), > attmap->attnums[conkey[i] - 1] - 1); > > We should use confkey[i] -1 not conkey[i] - 1;
Wow, how embarrasing, now that's one _really_ stupid bug and it's totally my own. Thanks for the analysis! I'll get this patched soon.
Hi,
When I debug codes, I find that the way to access AttrMap almost uses "attrmp_ptr->attnums[offset]."
The codes now usually don't check if the offset is out of bounds, which seems unsafe.