pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Darryl Pye <darrylpye@hotmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5767: Memory Leak
Date: Fri, 26 Nov 2010 09:45:55 +0800
Message-ID: <4CEF1153.7040208@postnewspapers.com.au> (raw)
In-Reply-To: <201011250428.oAP4Sp4f087291@wwwmaster.postgresql.org>
References: <201011250428.oAP4Sp4f087291@wwwmaster.postgresql.org>

On 11/25/2010 12:28 PM, Darryl Pye wrote:

 > PostgreSQL version: 9.01

32-bit or 64-bit ?

> A single postgres  process  appears to be constantly growing in memory usage
>   until it reaches 100% of memory on the machine.

How are you watching it? Task manager?

You need to use something that can differentiate between the shared 
memory block and the per-task private memory. Process Explorer can do 
that, IIRC.

> I have rebooted the server and the problem goes away but then  a single
> postgres.exe process continues to  eat memory until it uses all available
> ram then i have to restart again.

Are you able to identify which postgres process it is? Is it shown in 
"SELECT * from pg_stat_activity;" ?

Is it one of the postgres processes that appears when PostgreSQL is 
first started, before any connections are made to the database server?

Are you sure you're not looking at totals for all postgres.exe instances?

> I have made the following configuration changes from default
> shared_buffers = 1GB
> wal_buffers = 1MB	
> effective_cache_size = 2GB

With those settings, you should expect PostgreSQL to appear to use a bit 
over 1GB of RAM per postgres.exe, though the vast majority of that 1GB 
should be shared between all the postgres.exe processes so the total 
memory of all postgres.exe instances will appear to vastly exceed your 
machine's RAM. That's just because of the bad accounting for shared 
memory in most OSes, including windows, and doesn't affect how it runs.

--
Craig Ringer



view thread (3+ messages)

Message-ID: <4CEF1153.7040208@postnewspapers.com.au>
Permalink:  ../4CEF1153.7040208@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4CEF1153.7040208@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: craig@postnewspapers.com.au, darrylpye@hotmail.com
  Subject: Re: BUG #5767: Memory Leak
  In-Reply-To: <4CEF1153.7040208@postnewspapers.com.au>
  References: <201011250428.oAP4Sp4f087291@wwwmaster.postgresql.org> <4CEF1153.7040208@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox