> Bruce Momjian writes:
> > Here is an new patch that updates the percentage display when it is run,
> > rather than just displaying 75%. I had to do the computation using
> > floats to prevent overflow.
Sorry, I should have been doing this on patches list.
> You could use ldiv().
It is overflow that I am worried about: curr/max * 100
I don't see how ldiv helps here.
> Also, UINT_MAX (for transaction id) and OID_MAX (for Oid) might be
> preferred over ~0.
Done. Patch attached.
> Btw., there is a typo here:
> > GetCurrentTransactionId() - (float)(~(TransactionId)0) * 100);
Thanks. Fixed. I hadn't gotten to testing the transaction code yet,
just the oid test.
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2001-06-13 21:08:56|
|Subject: Re: [PATCH] addition of text_inet, text_cidr and inet_set_masklen|
|Previous:||From: Peter Eisentraut||Date: 2001-06-13 20:55:45|
|Subject: RE: vacuum|
pgsql-patches by date
|Next:||From: Bruce Momjian||Date: 2001-06-13 21:06:59|
|Subject: Re: sequence.c compile failure|
|Previous:||From: Peter Eisentraut||Date: 2001-06-13 20:35:26|
|Subject: Re: Patch to warn about oid/xid wraparound|