pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41067: time_t change from int to __int64_t breaks PostgreSQL databases
>Number: 41067
>Category: pkg
>Synopsis: Change of sizeof(time_t) breaks PostgreSQL on-disk structures
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 24 17:40:00 +0000 2009
>Originator: Thomas E. Spanjaard
>Release: NetBSD 5.99.8
>Organization:
>Environment:
System: NetBSD cassiopeia.ssr.netphreax.net 5.99.8 NetBSD 5.99.8 (CASSIOPEIA)
#0: Sat Mar 21 19:38:06 UTC 2009
tgen%cassiopeia.ssr.netphreax.net@localhost:/home/obj/netbsd/obj/sys/arch/amd64/compile/CASSIOPEIA
amd64
Architecture: x86_64
Machine: amd64
>Description:
Databases created with PostgreSQL before the time_t changes are broken after
building a new PostgreSQL after the time_t changes and trying to access them.
This is because PostgreSQL uses time_t values in on-disk structures, and thus
reads in eight bytes for any time_t value instead of four before. This renders
a database inoperable:
FATAL: incorrect checksum in control file
>How-To-Repeat:
1) Create a database on a pre-time_t changes-system;
2) Update NetBSD to post-time_t changes;
3) Compile and install a new PostgreSQL package;
4) Watch PostgreSQL die.
>Fix:
There are several possible fixes:
- Revert the time_t changes;
- Don't update NetBSD to post-time_t changes;
- Shake fist at christos and dump the database before updating (and loading
after);
- Bug the PostgreSQL people to move to a standard on-disk format independent
of the platform (i.e. don't store time_t values on disk, but a fixed format).
Home |
Main Index |
Thread Index |
Old Index