xlog_grant_log_space and xlog_regrant_log_write_space both have very similar structure. Both have a "wait on non-empty queue" section at the start, followed by a "wait for space" loop of which the co
I don't really like this patch. The new conditions are overly complicated because of the desire to only go through the loop once for the queue not empty case. In addition there's some behaviour chang
As you point out, there's no actual harm in doing that. I didn't think there's any harm in that, either, because we're walking the entire queue anyway and it does not dirty any global shared cachelin
The main objection is that the new code might be a bit shorted, but is a lot less readable. If you really want it go with it and an updated changelog mentioning the behaviour change, but I don't real