Michael, I think we are talking about 2 different scenarios. 1) the single operation is using more than work_mem ->
gets spilled to disk. like: a big sort. That's what i mentioned. 2) there are many many concurrent operations, and one more of them wants to allocate work_mem but the memory on the server is exhausted at that point. -> in that case you will get 'out of memory'. That's what you are referring to.
Given the description of the problem (RAM and Postgres
settings) and the fact that Alfonso says that "there is a lot of
free memory" i think is unlikely that we are in the second
situation described here above. regards, fabio pardi
On 20/07/18 15:28, MichaelDBA wrote:
wrong again, Fabio. PostgreSQL is not coded to manage memory usage in the way you think it does with work_mem. Here is a quote from Citus about the dangers of setting work_mem too high. |