pgstat: delayed write of stats file

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: pgstat: delayed write of stats file
Date: 2006-04-05 13:40:38
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA3524E@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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

Attachment Content-Type Size
pgstat_delay.patch application/octet-stream 8.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2006-04-05 13:48:53 Re: pgstat: delayed write of stats file
Previous Message Simon Riggs 2006-04-05 09:10:30 Re: WIP: splitting BLCKSZ