Re: [HACKERS] Stats processor not restarting

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Stats processor not restarting
Date: 2007-03-22 14:41:46
Message-ID: 200703221441.l2MEfkf05255@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> Not really, but maybe it would be sensible to reset last_pgstat_start_time
> >> when doing a database-wide restart?
>
> > You mean like this, attached?
>
> I'd be fairly surprised if resetting the variable in the child process
> had any effect on the postmaster...

Yep, me too. ;-)

> I think a correct fix would involve exposing either the variable or a
> routine to zero it from pgstat.c, and having postmaster.c do that at
> the points where it intentionally SIGQUITs the stats collector.

OK, patch attached. I just reset the value in all places where we were
killing the pgstat process and not immediately exiting ourselves.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
unknown_filename text/plain 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-22 14:53:59 Re: fixing dllist?
Previous Message Tom Lane 2007-03-22 14:41:08 Re: Fixing hash index build time

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-03-22 15:08:08 Re: LIKE optimization in UTF-8 and locale-C
Previous Message Magnus Hagander 2007-03-22 14:18:55 contrib/spi makefile inconsistency