Doug McNaught <doug@wireboard.com> writes:
> Have you double checked to make sure the ulimits for postmaster are
> large enough?
More to the point, what have you got SORT_MEM set to? We're assuming
that this allocation request is correct, and indeed it probably is if
you've got SORT_MEM cranked up to the moon. But if you don't then
there may be a different issue (like corrupted data).
FWIW, running with SORT_MEM set in the hundreds of megs on a 2gig
box does not strike me as a good idea. Keep in mind that that number
is *per sorting operation*. Each backend might be trying to use that
much simultaneously --- in fact, in complex queries it's not hard to
cause a single backend to be executing multiple sort steps.
regards, tom lane