From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Patch to warn about oid/xid wraparound |
Date: | 2001-06-13 21:04:32 |
Message-ID: | 200106132104.f5DL4Xt27579@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
> 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
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-13 21:08:56 | Re: [PATCH] addition of text_inet, text_cidr and inet_set_masklen |
Previous Message | Peter Eisentraut | 2001-06-13 20:55:45 | RE: vacuum |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2001-06-13 21:06:59 | Re: sequence.c compile failure |
Previous Message | Peter Eisentraut | 2001-06-13 20:35:26 | Re: Patch to warn about oid/xid wraparound |