From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris <ctlajoie@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to troubleshoot high mem usage by postgres?
Date: Sun, 28 Feb 2010 11:42:39 -0500
Message-ID: <9487.1267375359@sss.pgh.pa.us> (raw)
In-Reply-To: <57033cf81002271525w3bddc0acn63a5fd3f649068d4@mail.gmail.com>
References: <57033cf81002271429wb0da13am37b3cb6258103ea5@mail.gmail.com>
<B7ED361D-6F31-4E15-A814-C8293D51C852@silentmedia.com>
<57033cf81002271525w3bddc0acn63a5fd3f649068d4@mail.gmail.com>
Chris <ctlajoie@gmail.com> writes:
> @Tom Lane:
> As I mentioned above I am not doing everything in a single
> transaction. However I do want to try your suggestion regarding
> getting a "memory context map". But I'm afraid I don't know how to do
> what you are describing. How can I set the ulimit of postmaster?
Depends on the script you are using to start the postmaster. One way is
to call ulimit in the startup script right before it invokes the
postmaster. However, if you have something like
su - postgres -c "postmaster ..."
then I'd try putting it in the postgres user's ~/.profile or
~/.bash_profile instead; the su is likely to reset such things.
> And
> does the postmaster stderr output go to the postgres log file?
Also depends. Look at the startup script and see where it redirects
postmaster's stderr to. You might have to modify the script --- some
are known to send stderr to /dev/null :-(
Sorry to be so vague, but different packagers have different ideas
about how to do this.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, ctlajoie@gmail.com
Subject: Re: How to troubleshoot high mem usage by postgres?
In-Reply-To: <9487.1267375359@sss.pgh.pa.us>
* 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