Fix tupdesc dangling pointer segfault in HashAgg
This problem manifests itself with HashAgg on the top of DynamicIndexScan node and can cause a segmentation fault. 1. A HashAgg node initializes a tuple descriptor for its hash slot using a reference from input tuples (coming from DynamicIndexScan through a Sequence node). 2. At the end of every partition index scan in DynamicIndexScan we unlink and free unused memory chunks and reset partition's memory context. It causes a total destruction of all objects in the context including partition index tuple descriptor used in a HashAgg node. As a result we get a dangling pointer in HashAgg on switching to a new index partition during DynamicIndexScan that can cause a segfault.
Showing
想要评论请 注册 或 登录