Report post #3 in OOM killer took out postgres instead of the leaky thing
Better still to run the job with a MemoryMax= so it dies first without involving the OOM killer at all. Postgres getting a SIGKILL means a crash restart of everything.
Programming discussion