Thread: New contrib: pg_reset_stats()
Here is a new contrib. Extract it in the contrib directory and it will make its own subdir. Needs to be added to the contrib/Makefile. This is a function that allows you to reset the postgres stats collector from within postgres. It's documented, has an sql script and has been tested and works. This function should probably be put in the postgres backend as a builtin at some point methinks... Chris
Attachment
Oh - and could someone please test it on a multibyte install? Just need to know if I require multibyte headers to be ifdef'd. Chris > -----Original Message----- > From: pgsql-patches-owner@postgresql.org > [mailto:pgsql-patches-owner@postgresql.org]On Behalf Of Christopher > Kings-Lynne > Sent: Monday, 29 July 2002 3:05 PM > To: Patches > Subject: [PATCHES] New contrib: pg_reset_stats() > > > Here is a new contrib. Extract it in the contrib directory and > it will make > its own subdir. Needs to be added to the contrib/Makefile. > > This is a function that allows you to reset the postgres stats collector > from within postgres. > > It's documented, has an sql script and has been tested and works. > > This function should probably be put in the postgres backend as a > builtin at > some point methinks... > > Chris >
If you still are wondering about committing it, it only allows a super user to reset the stats: australia=# \connect - au-php You are now connected as new user au-php. australia=> select pg_reset_stats(); ERROR: Only database superusers can reset statistic counters Chris > -----Original Message----- > From: pgsql-patches-owner@postgresql.org > [mailto:pgsql-patches-owner@postgresql.org]On Behalf Of Christopher > Kings-Lynne > Sent: Monday, 29 July 2002 3:14 PM > To: Patches > Subject: Re: [PATCHES] New contrib: pg_reset_stats() > > > Oh - and could someone please test it on a multibyte install? > > Just need to know if I require multibyte headers to be ifdef'd. > > Chris > > > -----Original Message----- > > From: pgsql-patches-owner@postgresql.org > > [mailto:pgsql-patches-owner@postgresql.org]On Behalf Of Christopher > > Kings-Lynne > > Sent: Monday, 29 July 2002 3:05 PM > > To: Patches > > Subject: [PATCHES] New contrib: pg_reset_stats() > > > > > > Here is a new contrib. Extract it in the contrib directory and > > it will make > > its own subdir. Needs to be added to the contrib/Makefile. > > > > This is a function that allows you to reset the postgres stats collector > > from within postgres. > > > > It's documented, has an sql script and has been tested and works. > > > > This function should probably be put in the postgres backend as a > > builtin at > > some point methinks... > > > > Chris > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >
On Fri, Aug 02, 2002 at 10:18:34AM +0800, Christopher Kings-Lynne wrote: > australia=> select pg_reset_stats(); All the existing stats functions are named 'pg_stat_xxx' -- perhaps 'pg_stat_reset()' would be a better name? Also, why is this in contrib, rather than the backend proper? Cheers, Neil -- Neil Conway <neilconway@rogers.com> PGP Key ID: DB3C29FC
> All the existing stats functions are named 'pg_stat_xxx' -- perhaps > 'pg_stat_reset()' would be a better name? That had actually occurred to me - I now think that would be a better name. > Also, why is this in contrib, rather than the backend proper? Well, I've been given instructions on how to put it in the backend from Joe, so I'll give it a while - don't bother committing this contrib for a while then... Chris