If PostgreSQL failed to compile on your computer or you found a bug that is likely to be specific to one platform then please fill out this form and e-mail it to pgsql-ports@postgresql.org. To report any other bug, fill out the form below and e-mail it to pgsql-bugs@postgresql.org. If you not only found the problem but solved it and generated a patch then e-mail it to pgsql-patches@postgresql.org instead. Please use the command "diff -c" to generate the patch. You may also enter a bug report at http://www.postgresql.org/ instead of e-mail-ing this form. ============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Philip J Spence Your email address : philip@picdar.co.uk System Configuration --------------------- Architecture (example: Intel Pentium) : Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 300MHz) Operating System (example: Linux 2.0.26 ELF) : SunOS Release 5.8 Version Generic 64-bit PostgreSQL version (example: PostgreSQL-7.1): PostgreSQL-7.1beta4, PostgreSQL-7.1beta6,postgresql-7.1RC1 Compiler used (example: gcc 2.8.0) : Sun C Compiler version 5.0 Sun C Compiler version 4.2 Please enter a FULL description of your problem: ------------------------------------------------ backend core dumps in VACUUM ANALYZE processing in initdb Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- Follow INSTALL instructions: ./configure gmake gmake check This fails to complete the initialisation of the temporary database with a core dump generated. If you know how this problem might be fixed, list the solution below: --------------------------------------------------------------------- The problem is due to an alignment error in src/backend/access/heap/tuptoaster.c. The function toast_save_datum has declaration char chunk_data[VARHDRSZ + TOAST_MAX_CHUNK_SIZE]; so chunk_data need not be aligned to some special boundary and I guess the compiler is free to rearrange the stack frame as it sees fit. The statement VARATT_SIZEP(chunk_data) = chunk_size + VARHDRSZ; subsequently causes a bus error as it requires alignment for int32. My instant hack was to change it to void *chunk_data; and call palloc to get the required space (remembering to free it before the return). This fixes the problem. +++++++++++++++++++++++++++++++++++++++++++ Also src/bin/pg_dump/pg_backup_null.c (line 101 in RC1) if (*te->dataDumper) is considered an error "pg_backup_null.c", line 101: controlling expressions must have scalar type This needs to be changed to if (*te->dataDumper != NULL) to placate the compiler.