Re: Huge number of disk writes after migration to 8.1

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, <pgsql-bugs(at)postgreSQL(dot)org>
Subject: Re: Huge number of disk writes after migration to 8.1
Date: 2006-01-19 16:04:28
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C7EE9@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> > In most cases you're going to see extremely few reads compared to
> > writes on pg_stats, right? So why not have the backends
> connect to the
> > stats process (or perhaps use UDP, or use the pipe, or
> whatever) and
> > fetch the data when needed. So when nobody fetches any
> data, there is
> > no overhead (except for the stats process adding up values,
> of course).
>
> That's a thought. You'd still want the stats file to
> preserve the data across shutdowns, but the update rate could
> be far slower, maybe once every few minutes. The other nice
> thing is that when you do want the stats, you could get
> current values, not half-a-second-behind values.

Exactly. For those who care a lot about their stats data, we could offer
a config parameter for how often to write out the stats file.

> > Then you could also push down some filtering to the stats process -
> > for example, when you are reading from pg_stat_activity there is no
> > need to send over the row level stats. IIRC, today you have to read
> > (and write) the whole stats file anyways.
>
> No; the current behavior of grabbing a snapshot of the whole
> stats dataset is a feature, not a bug. It lets you sit there
> and correlate the data using multiple queries, without
> worrying that the numbers are changing under you. We'd lose
> this ability if the data had to be re-fetched for each query
> because we didn't grab it all.

Oh. Good point. Didn't even know we had that feature, but now that I do
I see it's a good one :-)

//Magnus

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Yeliseyev 2006-01-19 16:26:36 BUG #2186: syntax error in postgresql.conf
Previous Message Richard Huxton 2006-01-19 16:00:57 Re: Execution of stored procedures