Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> *) You may want to consider changing your vm over commit settings
> and/or reducing swap in order to get your server to more aggressively
> return OOM to postgres memory allocation. The specific error returned
> to postgres for an OOM of course would be very helpful.
Yeah. I would try starting the postmaster under smaller ulimit settings
so that the kernel gives it ENOMEM before you start getting swapped.
When that happens, the backend will dump a memory map into the
postmaster log that would be very useful for seeing what is actually
happening here.
regards, tom lane