I've attached a rebased patch which includes the "provisionally detach"
deadlock hazard fix approach as well as addresses some of the following
feedback from Jeff Davis provided off-list:
> Can you add some high-level comments that describe the algorithm and
> what the terms mean?
I added to the large comment at the top of nodeHashjoin.c. I've also
added comments to a few of the new members in some structs. Plus I've
added some in-line comments to assist the reviewer that may or may not
be overkill in a final version.
> Can you add some comments to describe what's happening when a batch is
> entering fallback mode?
...
> Can you add some comments describing tuple relocation?
...
> Can you describe somewhere what all the bits for outer matches are for?
All three done.
Also, we kept the batch 0 spilling patch David Kimura authored [1]
separate so it could be discussed separately because we still had some
questions.
It would be great to discuss those, however, keeping them separate might
be more confusing -- I'm not sure.