pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.
Дата
Msg-id E1QV8so-0007HX-Az@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Work around gcc 4.6.0 bug that breaks WAL replay.

ReadRecord's habit of using both direct references to tmpRecPtr and
references to *RecPtr (which is pointing at tmpRecPtr) triggers an
optimization bug in gcc 4.6.0, which apparently has forgotten about
aliasing rules.  Avoid the compiler bug, and make the code more readable
to boot, by getting rid of the direct references.  Improve the comments
while at it.

Back-patch to all supported versions, in case they get built with 4.6.0.

Tom Lane, with some cosmetic suggestions from Alex Hunsaker

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c2ba0121c73b7461331104a46d140156e847572a

Modified Files
--------------
src/backend/access/transam/xlog.c  |   37 +++++++++++++++++++++++------------
src/include/access/xlog_internal.h |   12 +++++-----
2 files changed, 30 insertions(+), 19 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Work around gcc 4.6.0 bug that breaks WAL replay.