Skip to content
Permalink
Browse files
HAWQ-1803. Fix sub-transcation rollback in SP
  • Loading branch information
ztao1987 committed Aug 27, 2021
1 parent fac6938 commit b116d03337beb615df705b8a580ac44d4e0b9666
Showing 1 changed file with 1 addition and 1 deletion.
@@ -393,7 +393,7 @@ AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid)
* If we are aborting a subtransaction and there is an open SPI context
* surrounding the subxact, clean up to prevent memory leakage.
*/
if (_SPI_current && !isCommit)
if (_SPI_current && !isCommit && _SPI_current->connectSubid >= mySubid)
{
/* free Executor memory the same as _SPI_end_call would do */
MemoryContextResetAndDeleteChildren(_SPI_current->execCxt);

0 comments on commit b116d03

Please sign in to comment.