Memory use exceeding limits dictated by MEMORYSIZE/PLANNEDCONCURRENCY
We have a huge table insert that we divide into pieces, each piece corresponding to one partition.
Recently we've had to insert more data during a weekly table "refresh" (where we drop partitions and repopulate them). I decided to make it faster by running a few queries concurrently instead of one at a time.
I have a standalone pool devoted to this. I set memorysize and maxmemorysize to 100G, and the maxconcurrency and plannedconcurrency to 4. My idea is that this is suited for running 4 queries, 25G RAM each. I ran a "live" test and it worked fine.
Last night it choked; three queries were fine, but one failed to get enough RAM. After poking around, it seemed like there's some kind of race condition: a query will initially get _more_ than 25G. Then (perhaps for other reasons) Vertica decides to do a join spill, and the query gets replanned. After that, it fits within its alloted 25G. The problem is that the loser of the race condition sees too little memory (say, 21G rather than 25G) and dies.
Is it indeeed possible that a query could snatch more than MEMORYSIZE/PLANNEDCONCURRENCY from the resource pool, even for only a short while before being replanned?