0

I got one huge query to run on postgresql 10.6.
The server got 64GB ram.
Work_mem:6GB
effective_cache_size:32GB
shared_buffers:16GB

The pgadmin4 always show out of memory for this query.
The ulimit of memory for postgres user is unlimited.
However, the swap is not using by postgresql all the time.
What's wrong?

  • Is it the server crashing, or the machine where pgAdmin is running? Could you please show the exact error message? – dezso Mar 19 at 11:19
  • If the query is huge in terms of how many rows it returns, you can use an SQL cursor and FETCH commands to retrieve results in small chunks. Other than that, your question is about Linux memory management, not about databases. – Daniel Vérité Mar 19 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.