In trying to run a benchmark comparing mingw with VC++ builds Dave discovered
that if you initdb with one and try to run with the other you get a message
saying "incorrect checksum in control file" rather than the more appropriate
and friendly "database files are incompatible with server".

This is because of (at least) two changes in the ABI between the runtimes used
by mingw and VC++. 1) Enums are apparently 8 bytes on VC++ but 4 bytes on
mingw and 2) time_t is 8 bytes on VC++ but 4 bytes on mingw.

To get the right message we could add the size of the control file (or
offsetof(crc)) to the control file itself near the top and check it before the
checksum. That would be an initdb though which would be annoying at this
point. I think we should do this at the next opportunity though.

But I'm a bit concerned about change in ABI between mingw and VC++. I thought
these two used the same ABI. Are we sure Slony et al don't use time_t or enums
or anything else which may have changed between these two runtimes?

-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's Slony Replication support!

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to