pgsql: TYPEALIGN doesn't work on int64 on 32-bit platforms.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: TYPEALIGN doesn't work on int64 on 32-bit platforms.
Дата
Msg-id E1VTJsF-00073z-Lv@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
TYPEALIGN doesn't work on int64 on 32-bit platforms.

The TYPEALIGN macro, and the related ones like MAXALIGN, don't work with
values larger than intptr_t, because TYPEALIGN casts the argument to
intptr_t to do the arithmetic. That's not a problem when dealing with
pointers or lengths or offsets related to pointers, but the XLogInsert
scaling patch added a call to MAXALIGN with an XLogRecPtr argument.

To fix, add wider variants of the macros, called TYPEALIGN64 and MAXALIGN64,
which are just like the existing variants but work with uint64 instead of
intptr_t.

Report and patch by David Rowley, analysis by Andres Freund.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5962519b362d28ef02bc8ec135b9bf9b9a168263

Modified Files
--------------
src/backend/access/transam/xlog.c |    2 +-
src/include/c.h                   |   12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix bugs in SSI tuple locking.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Oops. Unbreak the 9.1 build.