pgsql: Fix another longstanding problem in copy_relation_data: it was

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix another longstanding problem in copy_relation_data: it was
Date: 2010-07-29 19:23:58
Message-ID: 20100729192358.6262E7541D5@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_1_STABLE

Modified Files:
--------------
pgsql/src/backend/commands:
tablecmds.c (r1.174.2.11 -> r1.174.2.12)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.174.2.11&r2=1.174.2.12)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-07-29 19:24:05 pgsql: Fix another longstanding problem in copy_relation_data: it was
Previous Message Tom Lane 2010-07-29 19:23:52 pgsql: Fix another longstanding problem in copy_relation_data: it was