Jeff Janes <jeff.janes@gmail.com> writes:
> On Thu, Apr 23, 2015 at 10:17 AM, Heikki Linnakangas <hlinnaka@iki.fi>
> wrote:
>> In a nutshell, I don't think PostgreSQL should get involved in that...
> I have often wanted an SQL function which would expose the back-end's
> rusage statistics to the front-end. This could support a \timing feature
> variant to psql that reports more than just wall-clock time.
> I don't use RDS, and use shell access and "top" (and "strace" and "gdb")
> quite enthusiastically, but still it is a pain to correlate any given
> front-end to any given back-end.
> Would such an addition to core be welcome?
The reason nobody's gotten around to that in the last fifteen years is
that per-process rusage isn't actually all that interesting; there's
too much that happens in background daemons, for instance.
regards, tom lane