Re: [BUGS] BUG #1707: statistics collector starts with stats_start_collector - Mailing list pgsql-patches

From Tom Lane
Subject Re: [BUGS] BUG #1707: statistics collector starts with stats_start_collector
Date
Msg-id 11234.1119938733@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #1707: statistics collector starts with stats_start_collector  (Alvaro Herrera <alvherre@surnet.cl>)
Responses Re: [BUGS] BUG #1707: statistics collector starts with stats_start_collector  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
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.

The reason for a restart is that what "stats_start_collector" is REALLY
all about is telling the postmaster whether to establish the loopback
UDP socket for stats messaging.  You don't get to add that after the
fact because there'd be no way to propagate the open socket into
existing backends.

And no, I wouldn't look with favor on the idea of creating the socket
unconditionally.  One of the reasons for wanting to be able to turn
off pgstats entirely is so that you aren't dead in the water if the
loopback UDP socket won't work for some reason (example: kernel packet
filtering that's not under your control).

            regards, tom lane

pgsql-patches by date:

Previous
From: Eugen Nedelcu
Date:
Subject: Thousands commas in psql
Next
From: Petr Jelinek
Date:
Subject: Re: [PATCH] fix for pg_stat_database (numbackends is always