Avoid PANIC on multiple function execution when using ORCA
A cached query planned statement contains information that is freed after the first execution of a function. The second execution used the cached planned statement to populate the execution state using a freed pointer and throws a segmentation fault. To resolve, we copy the contents out of the planned statement rather than copying a pointer to the planned statement, so that when our executor state gets freed, it does not also free the cached data. Note: `numSelectorsPerScanId` is the problematic property, and is only used for partition tables. Co-authored-by: NDavid Kimura <dkimura@pivotal.io> Co-authored-by: NTaylor Vesely <tvesely@pivotal.io>
Showing
想要评论请 注册 或 登录