Kyle <kaf@nwlink.com> writes:
> When I profile the postmaster do the forked backends also show up in
> the profile? Or do I need to profile those separately? (and how?)
As each process (postmaster or backend) terminates, it drops a gmon.out
file in the directory it was working in. As long as you are profiling
a backend that's alone in the database it's in, the gmon.out file in
$PGDATA/base/dbnumber/gmon.out is the one you want.
The profile results for a backend will include the CPU usage of the
postmaster up to the instant that the backend was forked off, but it's
normally easy to ignore that, particularly if you haven't been running
the profilable postmaster for very long before you do the test.
regards, tom lane