Alfonso, Do you happened to know how large the process is when it starts giving error messages, anywhere near 47GB? — but we tried with work_mem to 130mb, shared_buffer to a maximum fo 40gb, Having shared_buffer to 40GB would be two high for the current configuration and I would expect to see out of memory errors given that your system commit limit is 47GB; However, with shared_buffers at 23GB I don’t think you should be hitting the 47GB limit — are you? To increase the commit limit you can add more swap and/or adjust the overcommit ratio.