As to what exactly goes wrong... What I can report is that using that commit, it mostly works, until the scheduling gets tight. I.e. under intense pgsql query load, things go wrong. So that suggests that there might be issues that occur when
Hmm, curious. If we tried to reproduce this without pgsql though, what would we be looking for? Data going out on the Stdio.File being not what one would expect it to be? I.e. not a crash or so?