pgsql: Fix another longstanding problem in copy_relation_data: it was - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix another longstanding problem in copy_relation_data: it was
Date
Msg-id 20100729192405.48FA97541D6@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix another longstanding problem in copy_relation_data: it was blithely
assuming that a local char[] array would be aligned on at least a word
boundary.  There are architectures on which that is pretty much guaranteed to
NOT be the case ... and those arches also don't like non-aligned memory
accesses, meaning that log_newpage() would crash if it ever got invoked.
Even on Intel-ish machines there's a potential for a large performance penalty
from doing I/O to an inadequately aligned buffer.  So palloc it instead.

Backpatch to 8.0 --- 7.4 doesn't have this code.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablecmds.c (r1.142.4.13 -> r1.142.4.14)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.142.4.13&r2=1.142.4.14)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix another longstanding problem in copy_relation_data: it was
Next
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Fix indentation of verbatim block elements Block elements with