Kevin Brown <kevin@sysexperts.com> writes:
> Would it make more sense to enable stats_command_string by default?
I'd vote against it. If we turn it on by default, people are paying
for a feature they may not even know exists. Once they find out about
it and decide they want it, they can turn it on easily enough.
If you can show that the overhead is unmeasurable, that'd indicate that
this argument is bogus; but I suspect it's not negligible, at least on
simple queries.
> It would also be handy if users could see their own queries while the
> rest remain blank. That would require changing
> pg_stat_get_backend_activity() so that it returns a value if the user
> is the superuser or if the user asking for the answer is the same as
> the user who owns the backend entry being looked up. Are there any
> pitfalls to implementing that?
Seems reasonable offhand ...
regards, tom lane