Peter Eisentraut <[EMAIL PROTECTED]> writes: > Lee Kindness writes: > > > You don't... and you simply shouldn't care. If there is a_r version > > available then we should use it - even if the plain version is "safe". > > The problem with this is that the automatic determination (in configure) > whether there is a xxx_r() version is, in general, fragile. We cannot > rely on configure saying that xxx_r() doesn't exist, so the plain xxx() > should be good enough. Else, we'd be shipping claimed-to-be-thread-safe > libraries that might trigger bugs that will be hard to track down.
Um. I don't think that's true. I mean, in theory it's true, but in practice why would an OS have some *_r but have only non-thread-safe versions of others? The only OSes like that would be ones that were in the process of developing thread-safe libraries and hadn't finished yet. Perhaps early versions of Solaris or CVS snapshots of BSD? I don't know of any actual releases that anyone would want to be running today. Postgres doesn't need to work around problems like that. At worst it should have a blacklist of OS versions that it knows not to even bother building a threadsafe libpq for. -- greg ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match