Re: PostreSQL v9.2 uses a lot of memory in Windows XP - Mailing list pgsql-performance

From Peter Geoghegan
Subject Re: PostreSQL v9.2 uses a lot of memory in Windows XP
Date
Msg-id CAEYLb_Xz=jOKdkLmZcPK45Hs7X_CEbE5iX89=hUJ_LfWL=QKYg@mail.gmail.com
Whole thread Raw
In response to Re: PostreSQL v9.2 uses a lot of memory in Windows XP  (Craig Ringer <craig@2ndQuadrant.com>)
List pgsql-performance
On 14 November 2012 06:47, Craig Ringer <craig@2ndquadrant.com> wrote:
> Yes, it's absurd that it's so hard to work out how much memory Pg uses. It'd
> be nice if Pg provided better tools for this by allowing the postmaster to
> interrogate backends' memory contexts, though that'd only report how much
> memory Pg thought it was using, not how much memory it was actually using
> from the OS. Really, OS-specific tools are required, and nobody's written
> them - at least, I'm not aware of any that've been published.

I wrote a GDB Python script that interrogates a running backend about
memory context information, walking a tree of contexts, which is based
almost entirely on standard infrastructure used by
MemoryContextStats(). It's quite possible. You're quite right to say
that OS-specific tools would probably do a more satisfactory job,
though, particularly if you're not interested in *what* Postgres is
doing with memory, but need to summarise it usefully.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-performance by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PostreSQL v9.2 uses a lot of memory in Windows XP
Next
From: Jon Nelson
Date:
Subject: Re: postgres 8.4, COPY, and high concurrency