Darren Reed <darrenr@fastmail.net> writes:
> # /usr/pkg/bin/psql -U postgres template1
> psql: FATAL: out of memory
> DETAIL: Failed on request of size 20.
I'm starting to think there is something very broken about your machine :-(.
Have you run any hardware diagnostics on it lately? The level of
flakiness you're seeing starts to suggest bad RAM to me.
Anyway, the above error should have also produced a map of per-context
memory usage in the postmaster log (ie, postmaster stderr). If you
could show us that, it might be revealing.
regards, tom lane