Re:Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread mark
Hi Tomas,Uwe,David G Thanks for your reply. >So, did a single process use 70% of memory, or all postgres processes >combined? all postgres processes use over 70% of memory. >If just a single process, it might be a poor plan choice (e.g. hash >aggregate may easily cause that). because

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Scott Marlowe
On Wed, Dec 20, 2017 at 9:25 AM, Andreas Kretschmer wrote: > > > Am 20.12.2017 um 16:08 schrieb mark: >> >> postgresql process used over 70% of memory and occuered OOM. >> what should I do to deal with this problem? > > >

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 9:59:24 AM PST David G. Johnston wrote: > On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > > IIRC work_mem is a PER CONNECTION setting, > > ​The docs for this setting clearly state that a single connection/session > can itself use multiple times this

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread David G. Johnston
On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > IIRC work_mem is a PER CONNECTION setting, > ​The docs for this setting clearly state that a single connection/session can itself use multiple times this values for a single query.

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 11:08:51 PM PST mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. > momery size is 16GB. > postgresql process used over 70% of memory and occuered OOM. > what should I do to deal with this problem? IIRC

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Tomas Vondra
On 12/20/2017 04:08 PM, mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. That means if you have all 50 connections active, they may easily consume 100% of memory, because 50 * 2 is 100. It's even easier if the connections are executing

postgresql 9.5 has ocuuered OOM

2017-12-20 Thread mark
I have set shared_buffers is 1/4 of memory. work_mem is 2% of memory. max_connections is 50. momery size is 16GB. postgresql process used over 70% of memory and occuered OOM. what should I do to deal with this problem?