You are almost certainly running out of memory. Your __alloc_pages: error message shows the kernel is trying to allocate a single memory page but the allocation fails, which means that either both physical memory and swap are completely full or all current physical pages have been marked non-swappable (exceeding unlikely). (As it's a single page allocation, page contiguity considerations aren't applicable.)
When the OOM killer is choosing something to kill, it has a preference for processes which are both consuming a lot of memory and have been running for only a short time. MySQL, which spawns many, short-lived threads, is a favourite because it is greedy for memory and looks short-lived because it has young threads. I imagine this also holds true for postgresql.
I suggest that you post the output of:
Code:
ps -e -o pid,cmd,%mem,rss,trs,sz,vsz
and
Code:
cat /proc/meminfo
to see what your memory usage is like.