Re: pgstat: delayed write of stats file - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: pgstat: delayed write of stats file
Date
Msg-id 200604270006.k3R06qw25565@candle.pha.pa.us
Whole thread Raw
In response to pgstat: delayed write of stats file  ("Magnus Hagander" <mha@sollentuna.net>)
Responses Re: pgstat: delayed write of stats file
List pgsql-patches
Patch applied.  Thanks.

---------------------------------------------------------------------------


Magnus Hagander wrote:
> Per some earlier discussion, here is an attempt at implementing a
> "delayed write" of the pgstats file, to decrease the write activity on
> that file.
>
> It changes so the file is only written once every 5 minutes (changeable
> of course, I just picked something) instead of once every half second.
> It's still written when the stats collector shuts down, just as before.
> And it is now also written on backend request. A backend requests a
> rewrite by simply sending a special stats message. It operates on the
> assumption that the backends aren't actually going to read the
> statistics file very often, compared to how frequent it's written today.
>
>
> //Magnus

Content-Description: pgstat_delay.patch

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Show tablespace for databases with psql's \l+
Next
From: Bruce Momjian
Date:
Subject: Re: schema-qualified SET CONSTRAINTS