Re: BlockNumber fixes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BlockNumber fixes
Date
Msg-id 17228.1026137948@sss.pgh.pa.us
Whole thread Raw
In response to BlockNumber fixes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: BlockNumber fixes
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I did some research on this and generated the following patch.  I didn't
> find much in the way of problems except two vacuum.c fields that should
> probably be BlockNumber.  freespace.c also has a numPages field in
> FSMRelation that is int.  Should that be BlockNumber?

Not necessary, since the freespace map will never be large enough to
overflow a signed int (it wouldn't fit in the address space if it were).
I think that your changes in vacuum.c are probably unnecessary for the
same reason.  I am generally wary of changing values from signed to
unsigned without close analysis of how they are used --- did you look
at *every* comparison involving these fields?  How about arithmetic
that might compute a negative result?
        regards, tom lane




pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Proposal: CREATE CONVERSION
Next
From: Bruce Momjian
Date:
Subject: Re: Issues Outstanding for Point In Time Recovery (PITR)