Greg Stark <gsstark(at)mit(dot)edu> writes:
> Ok, I have a copy of postgres built with -pg now. I'm running grpof on the
> gmon.out file but all I'm seeing is this:
> I assume this is only the postmaster initialization as I've run a smaller
> version of the job which took 8 minutes. Is there an easy trick to getting
> gmon.out output from a specific backend process?
Two things: one, backends dump gmon.out into $PGDATA/base/yourdb/,
whereas the postmaster dumps into wherever you started it (it never does
chdir IIRC). Two, if you're on Linux you must compile postmaster.c with
-DLINUX_PROFILE, or you won't get any profiling timer interrupts in
child processes.
Your sample looks like the second problem...
regards, tom lane