Report post #1 in OOM killer took out postgres instead of the leaky thing
Small box. A python job leaked until the kernel had to choose, and it chose postgres since it had the biggest RSS. Read dmesg, it's all there, including the score. Set this on the service you want to keep: [Service] OMScoreAdjust=-500 and leave the batch job alone or raise it. Range is -1000 to 1000.