Re: pg_class.relpages/allvisible probably shouldn't be a int4
От | Andres Freund |
---|---|
Тема | Re: pg_class.relpages/allvisible probably shouldn't be a int4 |
Дата | |
Msg-id | d6f7dabf-08b3-465a-9713-a9eae06c6a43@email.android.com обсуждение исходный текст |
Ответ на | Re: pg_class.relpages/allvisible probably shouldn't be a int4 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pg_class.relpages/allvisible probably shouldn't be a int4
|
Список | pgsql-hackers |
On May 9, 2014 10:37:49 PM CEST, Tom Lane <tgl@sss.pgh.pa.us> wrote: >Andres Freund <andres@2ndquadrant.com> writes: >> That's nothing for 9.4 anymore, but shouldn't we make >pg_class.relpages >> a int8 (sounds slightly better than float to me) or somesuch? > >No; those are really BlockNumbers, and have always been. float4 would >lose information and float8 or int8 would waste space. If we had an >unsigned int type it'd be better. I suppose we could declare them as >OID, >but that would probably confuse people no end. Well negative numbers aren't great either. Although admittedly it's not yet affecting many... I think the waste of storing 2*4 additional bytes isn't going to hurt much. And adding a proper unsigned type doesn't sound like a small amount of work. Not to speak of overloading troubles.... I realize they are block numbers and casted in most places - that's why the overflow doesn't seem to cause too many troubles. Andres -- Please excuse brevity and formatting - I am writing this on my mobile phone. Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: