Re: HOT patch, missing things

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "Pavan Deolasee" <pavan(at)enterprisedb(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HOT patch, missing things
Date: 2007-08-07 20:52:51
Message-ID: 28433.1186519971@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> On Tue, 2007-08-07 at 15:14 -0400, Tom Lane wrote:
>> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>>> We also need something that will re-zero the stats when they reach
>>> anywhere near integer overflow, since we must not allow them to wrap. I
>>> would suggest we simply reset all values to zero for that table.
>>
>> pgstat counters are int64.

> You would prefer undefined behaviour at wrap?

You should live so long as to have a problem with it. Do the math:
at one increment every nanosecond, 24x7x365, you'd be risking overflow
after about 300 years of continuous initdb-less operation. For someone
opining that important features are OK to omit from HOT for 8.3, I have
to question your judgment in worrying about this.

(In point of fact, I'd expect a database to wrap its WAL LSN counter
long before any particular pgstat counter could overflow. Someday we
might want to worry about that, but probably not in my lifetime.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-08-07 21:01:50 Re: HOT patch, missing things
Previous Message Joshua D. Drake 2007-08-07 20:15:34 Re: GIT patch