Robert Haas <robertmh...@gmail.com> writes: > Yeah, and I worry about min and max not being very usable - once they > get pushed out to extreme values, there's nothing to drag them back > toward normality except resetting the stats, and that's not something > we want to encourage people to do frequently. Of course, averages over > very long sampling intervals may not be too useful anyway, dunno.
Good point, but that doesn't mean that the request is unreasonable. For min/max, we could possibly address this concern by introducing an exponential decay over time --- that is, every so often, you take some small fraction of (max - min) and add that to the running min while subtracting it from the max. Or some other variant on that theme. There might be a way to progressively discount old observations for average too, though I'm not sure exactly how at the moment. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers