Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> the temp files shoul be coming from hash operations but AFAICS the
> files are small and every hash operation should be using until
> work_mem memory, right?
No, when a hash spills to disk the code has to guess the partition sizes
(number of buckets per partition) in advance. So it wouldn't be at all
surprising if the actual sizes come out substantially different from
work_mem.
regards, tom lane