Re: Database file compatability
От | Tom Lane |
---|---|
Тема | Re: Database file compatability |
Дата | |
Msg-id | 6118.1127917371@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Database file compatability ("Qingqing Zhou" <zhouqq@cs.toronto.edu>) |
Ответы |
Re: Database file compatability
|
Список | pgsql-hackers |
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes: > "Tom Lane" <tgl@sss.pgh.pa.us> wrote in message > There is a possible sequence like this: > ALIGNOF_LONG 4 > ALIGNOF_DOUBLE 8 > MAXIMUM_ALIGNOF 8 > vs. > ALIGNOF_LONG 8 > ALIGNOF_DOUBLE 8 > MAXIMUM_ALIGNOF 8 > So we should at least check ALIGNOF_LONG as well. No, we don't need to, because we do not really care about ALIGNOF_LONG per se. We don't use "long" as an on-disk datatype, precisely because we don't know what size it is. We use int32 and int64. The former has align 4 on all machines AFAIK, and the latter has MAXIMUM_ALIGNOF. > There are some machines with sizeof(int) equals to 64, if my memory saves, > which might imply that ALIGNOF_INT equals to 8. If there were such a machine, Postgres wouldn't run on it anyway, and a lot of other software too. There'd be no way to have both int16 and int32 types ("short" could cover only one of them). regards, tom lane
В списке pgsql-hackers по дате отправления: