]> granicus.if.org Git - postgresql/commit
Fix another longstanding problem in copy_relation_data: it was blithely
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Jul 2010 19:23:51 +0000 (19:23 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Jul 2010 19:23:51 +0000 (19:23 +0000)
commita0ad1d1f831d92e9bd94f6e821cc6c85804272e5
tree29b4bb581b65ce106f5fa4e229196195587d6acd
parentfb28d2604a419c48b0f6f8df46198a90d8343209
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.
src/backend/commands/tablecmds.c