Re: Patch to warn about oid/xid wraparound - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Patch to warn about oid/xid wraparound
Date
Msg-id Pine.LNX.4.30.0106132231390.756-100000@peter.localdomain
Whole thread Raw
In response to Re: Patch to warn about oid/xid wraparound  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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.

You could use ldiv().

Also, UINT_MAX (for transaction id) and OID_MAX (for Oid) might be
preferred over ~0.

Btw., there is a typo here:

>     GetCurrentTransactionId() - (float)(~(TransactionId)0) * 100);

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: create user problem
Next
From: Peter Eisentraut
Date:
Subject: RE: vacuum