Alvaro Herrera <alvherre@surnet.cl> writes:
> What about arranging postmaster's main loop so that it starts the stats
> collector process if one of the options is activated (assuming they were
> all off at start)? Right now you have to restart the server, but I
> don't see why it has to be like that.
Actually, this entire thread is based on a misconception: the "bug"
reporter was under the misimpression that the sum total of what the
collector does is described by the three suboptions, and so having
start_collector on without any of the suboptions on is a useless state.
But this is not so. The collector tracks backend start/end in any case,
and so you get a useful list of sessions in pg_stat_activity even
without enabling any of the more expensive reporting options.
So my vote at this point is that the code is not broken and we should
not change it. Possibly the documentation could stand a little
improvement.
regards, tom lane