Commit 8e21bf5
committed
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.1 parent 3137b49 commit 8e21bf5
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
5729 | 5729 | | |
5730 | 5730 | | |
5731 | 5731 | | |
| 5732 | + | |
| 5733 | + | |
5732 | 5734 | | |
5733 | 5735 | | |
5734 | 5736 | | |
5735 | | - | |
5736 | | - | |
5737 | 5737 | | |
5738 | 5738 | | |
5739 | 5739 | | |
| |||
5744 | 5744 | | |
5745 | 5745 | | |
5746 | 5746 | | |
| 5747 | + | |
| 5748 | + | |
| 5749 | + | |
| 5750 | + | |
| 5751 | + | |
| 5752 | + | |
| 5753 | + | |
| 5754 | + | |
| 5755 | + | |
5747 | 5756 | | |
5748 | 5757 | | |
5749 | 5758 | | |
| |||
5807 | 5816 | | |
5808 | 5817 | | |
5809 | 5818 | | |
| 5819 | + | |
| 5820 | + | |
5810 | 5821 | | |
5811 | 5822 | | |
5812 | 5823 | | |
| |||
0 commit comments