Re: [GENERAL] Stats Collector
От | Christopher Kings-Lynne |
---|---|
Тема | Re: [GENERAL] Stats Collector |
Дата | |
Msg-id | GNELIHDDFBOCMGBFGEFOGEHBCDAA.chriskl@familyhealth.com.au обсуждение исходный текст |
Ответ на | Re: [GENERAL] Stats Collector (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> Bruce Momjian <pgman@candle.pha.pa.us> writes: > >> It all works now and I have just submitted it to -patches as a > new contrib, > >> but it probably should make its way into the backend one day. > > > OK, the big question is how do we want to make stats reset visible to > > users? The current patch uses a function call. Is that how we want to > > do it? > > Should we make it visible at all? I'm concerned about security. The function it's calling in the backend: void pgstat_reset_counters(void) { PgStat_MsgResetcounter msg; if (pgStatSock < 0) return; if (!superuser()) elog(ERROR, "Only database superusers can reset statistic counters"); pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_RESETCOUNTER); pgstat_send(&msg, sizeof(msg)); } Note it does actually check that you're a superuser... Chris
В списке pgsql-hackers по дате отправления: