Re: work_mem and shared_buffers question

2020-02-10 Thread Naresh g
No, as I said, as per my observation your connection will not use your work mem unless there is a sort happening, but Yes, every connection uses certain amount of RAM, some documents say it 5 MB and some say it is 1.9 MB. Expert review may be needed on my observation. On Mon, 10 Feb, 2020,

Re: work_mem and shared_buffers question

2020-02-10 Thread Ayub M
Thanks, for q2 - if work_mem is a limit before spilling onto disk, is there a min amount of memory which gets allocated to each session when it starts? On Mon, Feb 10, 2020 at 3:51 AM Naresh g wrote: > 1. Yes, by default it is advisable to set 25% of RAM to shared buffers > because community ve

Re: work_mem and shared_buffers question

2020-02-10 Thread Naresh g
1. Yes, by default it is advisable to set 25% of RAM to shared buffers because community version postgres highly depends on OS cache, which means when you fetch something from disk, it is first copied to OS cache (75%) then to shared buffers(25%). Two copies of data will be there in your system R