On Sun, May 07, 2006 at 08:21:43PM -0400, Tom Lane wrote: > > changes in any of the following: > > > PG_VERSION_NUM > > CATALOG_VERSION_NO > > the size of 8 basic C types > > BLCKSZ=20 > > NAMEDATALEN=20 > > HAVE_INT64_TIMESTAMP > > INDEX_MAX_KEYS > > FUNC_MAX_ARGS > > VARHDRSZ > > MAXDIM > > The compiler used (only brand, not version) > > That seems way overkill to me. FUNC_MAX_ARGS is good to check, but > most of those other things are noncritical for typical add-on modules.
I was trying to find variables that when changed would make some things corrupt. For example, a changed NAMEDATALEN will make any use of the syscache a source of errors. A change in INDEX_MAX_KEYS will break the GiST interface, etc. I wondered about letting module writers to select which parts are relevent to them but that just seems like handing people a footgun. > In particular I strongly object to the check on compiler. Some of us do > use systems where gcc and vendor compilers are supposed to interoperate > ... and aren't all those Windows compilers supposed to, too? AFAIK Maybe that's the case now, it didn't used to be. I seem to remember people having difficulties because they compiled the server with MinGW and the modules with VC++. I'll take it out though, it's not like it costs anything. > it's considered the linker's job to prevent loading 32-bit code into > a 64-bit executable or vice versa, so I don't think we need to be > checking for common assumptions about sizeof(long). I know ELF headers contain some of this info, and unix in general doesn't try to allow different bit sizes in one binary. Windows used to (maybe still has) a mechanism to allow 32-bit code to call 16-bit libraries. Do they allow the same for 64-bit libs? > I'm pretty sure we had agreed that magic blocks should be required; > otherwise this check will accomplish little. Sure, I just didn't want to break every module in one weekend. I was thinking of adding it with LOG level now, send a message on -announce saying that at the beginning of the 8.2 freeze it will be an ERROR. Give people time to react. Have a nice day, -- Martijn van Oosterhout <email@example.com> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
Description: Digital signature