Frits Jalvingh <jal@etc.to> writes:
> Just to be clear: my real question is: why is temp_file_limit not working
> at the specified size?
I've not looked at that code lately, but I strongly suspect that
it's implemented in such a way that it's a per-process limit, not a
per-session limit. So each parallel worker could use up that much
space.
It's also possible that you've found an actual bug, but without
a reproducer case nobody's going to take that possibility too
seriously. We're unlikely to accept "the limit should work
across multiple processes" as a valid bug though. That would
require a vastly more complicated implementation.
regards, tom lane