Thanks Simon, this is a relatively simple query so I don't have any immediate reason to suspect a memory leak. I did find these messages in the seg7 logs:
2019-02-07 10:51:54.525774 EST,"myuser","mydb",p65712,th493721728,"xxx.xxx.xxx.xxx","8057",2019-02-07 10:51:53 EST,0,con1892,cmd3,seg7,,dx4594,,sx1,"LOG","00000","Resource group memory information: current group id is 133463, memLimit cap is 10, memSharedQuota cap is 20, memSpillRatio cap is 20, group expected memory limit is 677 MB, memory quota granted in currenct group is 540 MB, shared quota granted in current group is 137 MB, memory assigned to all running slots is 108 MB, memory usage in current group is 172 MB, memory shared usage in current group is 136 MB, memory quota in current slot is 36 MB, memory usage in current slot is 172 MB, memory usage in current proc is 168 MB",,,,,,,0,,,,
2019-02-07 10:51:54.525905 EST,"myuser","mydb",p65712,th493721728,"xxx.xxx.xxx.xxx","8057",2019-02-07 10:51:53 EST,0,con1892,cmd3,seg7,,dx4594,,sx1,"LOG","00000","Logging memory usage for reaching resource group limit",,,,,,"delete from my_schema.""my_table"" using ""my_table_s"" where my_schema.""my_table"".col1=""my_table_s"".col1",0,,"memprot.c",268,
There's then what looks like a very detailed breakdown of the internal memory allocations that's a little hard to follow, but I can post if that would be helpful. After that are the messages:
2019-02-07 10:51:54.528119 EST,"myuser","mydb",p65712,th493721728,"xxx.xxx.xxx.xxx","8057",2019-02-07 10:51:53 EST,0,con1892,cmd3,seg7,,dx4594,,sx1,"ERROR","53400","Out of memory","Resource group memory limit reached",,,,,"delete from my_schema.""my_table"" using ""my_table_s"" where my_schema.""my_table"".col1=""my_table_s"".col1",0,,"memprot.c",320,
2019-02-07 10:51:54.528147 EST,"myuser","mydb",p65712,th493721728,"xxx.xxx.xxx.xxx","8057",2019-02-07 10:51:53 EST,0,con1892,cmd3,seg7,,dx4594,,sx1,"LOG","00000","An exception was encountered during the execution of statement: delete from my_schema.""my_table"" using ""my_table_s"" where my_schema.""my_table"".col1=""my_table_s"".col1",,,,,,,0,,,,
Based on Ivan't comment, I am assuming that this particular query ran out of memory on an operation that wasn't able to spill to disk. We are still learning how to best tune our resource groups for our workload, but what I really wanted to understand with this post was how the spill to disk worked and what the limitations are so that we can take that into account when tuning. This particular type of query is part of our standard load process so we definitely want to tune the workload group for our load utilities with this type of query in mind.