On Mon, 27 May 2013, Christos Zoulas wrote:
There have been two major bugs I can remember relating to NetBSD's 64 bit time_t. [...] 2. Postgres assumed the sizeof(time_t) == sizeof(long), and when systems upgraded to NetBSD-6 and recompiled postgres (because the compatibility code just works fine), it exposed that postgres bug and none of the databases would load.
Let me expand a little about the compatibility code. Up to and including NetBSD-5.x, NetBSD on 32-bit platforms used 32-bit time_t (the same size as long). NetBSD-6.0 was the first release in which NetBSD on 32-bit platforms used 64-bit time_t (but 32-bit long). The kernel and libc provide compatibility interfaces that allow applications that were compiled against an older version of NetBSD to continue to work (with 32-bit time_t in the application) when run under a newer kernel (with 64-bit time_t in the kernel). Because of the compatibility code, latent bugs in applications that were compiled on an older version of NetBSD (that had 32-bit time_t) may be hidden until the application is recompiled under the newer version of NetBSD (with 64-bit time_t). --apb (Alan Barrett)