13
13
*
14
14
*
15
15
* IDENTIFICATION
16
- * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.89 2004/08/29 05: 06:43 momjian Exp $
16
+ * $PostgreSQL: pgsql/src/backend/main/main.c,v 1.90 2004/09/24 06:29:07 neilc Exp $
17
17
*
18
18
*-------------------------------------------------------------------------
19
19
*/
@@ -71,18 +71,23 @@ main(int argc, char *argv[])
71
71
72
72
#if defined(__alpha ) /* no __alpha__ ? */
73
73
#ifdef NOFIXADE
74
- int buffer [] = {SSIN_UACPROC , UAC_SIGBUS };
75
- #endif /* NOFIXADE */
76
- #ifdef NOPRINTADE
77
- int buffer [] = {SSIN_UACPROC , UAC_NOPRINT };
78
- #endif /* NOPRINTADE */
74
+ int buffer [] = {SSIN_UACPROC , UAC_SIGBUS | UAC_NOPRINT };
75
+ #endif
79
76
#endif /* __alpha */
80
77
81
78
#ifdef WIN32
82
79
char * env_locale ;
83
80
#endif
84
81
85
- #if defined(NOFIXADE ) || defined(NOPRINTADE )
82
+ /*
83
+ * On some platforms, unaligned memory accesses result in a kernel
84
+ * trap; the default kernel behavior is to emulate the memory
85
+ * access, but this results in a significant performance
86
+ * penalty. We ought to fix PG not to make such unaligned memory
87
+ * accesses, so this code disables the kernel emulation: unaligned
88
+ * accesses will result in SIGBUS instead.
89
+ */
90
+ #ifdef NOFIXADE
86
91
87
92
#if defined(ultrix4 )
88
93
syscall (SYS_sysmips , MIPS_FIXADE , 0 , NULL , NULL , NULL );
@@ -94,7 +99,7 @@ main(int argc, char *argv[])
94
99
write_stderr ("%s: setsysinfo failed: %s\n" ,
95
100
argv [0 ], strerror (errno ));
96
101
#endif
97
- #endif /* NOFIXADE || NOPRINTADE */
102
+ #endif /* NOFIXADE */
98
103
99
104
#if defined(WIN32 )
100
105
{
0 commit comments