Re: [HACKERS] Stats processor not restarting - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] Stats processor not restarting
Date
Msg-id 200703220204.l2M249127340@momjian.us
Whole thread Raw
Responses Re: [HACKERS] Stats processor not restarting
List pgsql-patches
Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > Bah, sorry about the noise. It was the effect of
> > PGSTAT_RESTART_INTERVAL.
> > Do we want to add some logging when we don't restart it due to repeated
> > failures?
>
> Not really, but maybe it would be sensible to reset last_pgstat_start_time
> when doing a database-wide restart?  The motivation for the timeout was
> to reduce cycle wastage if pgstat crashed by itself, but when you've
> deliberately SIGQUITed it, that hardly seems to apply ...

You mean like this, attached?

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/postmaster/pgstat.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v
retrieving revision 1.149
diff -c -c -r1.149 pgstat.c
*** src/backend/postmaster/pgstat.c    16 Mar 2007 17:57:36 -0000    1.149
--- src/backend/postmaster/pgstat.c    22 Mar 2007 02:03:31 -0000
***************
*** 1929,1934 ****
--- 1929,1937 ----
  static void
  pgstat_exit(SIGNAL_ARGS)
  {
+     /* allow stats to restart immediately after SIGQUIT */
+     last_pgstat_start_time = 0;
+
      need_exit = true;
  }


pgsql-patches by date:

Previous
From: Jeremy Drake
Date:
Subject: Re: patch adding new regexp functions
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Stats processor not restarting