Re: libpq thread safety - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq thread safety
Date
Msg-id 17158.1073843127@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq thread safety  (Manfred Spraul <manfred@colorfullife.com>)
Responses Re: libpq thread safety  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> +  *    Used to set callback that prevents concurrent access to
> +  *    non-thread safe functions that libpq needs.
> +  *    The default implementation uses a libpq internal mutex.
> +  *    Only required for multithreaded apps on platforms that
> +  *    do not support the thread-safe equivalents and that want
> +  *    to use the functions, too.
> +  *    List of functions:
> +  *    - stderror, getpwuid, gethostbyname.

Wait a minute.  I am *not* buying into any proposal that we need to
support ENABLE_THREAD_SAFETY on machines where libc is not thread-safe.
We have other things to do than adopt an open-ended commitment to work
around threading bugs on obsolete platforms.  I don't believe that any
sane application programmer is going to try to implement a
multi-threaded app on such a platform anyway.

As I said before, I think we should rip out the useless mutex code that
is already there, not introduce a "better" solution to a non-problem.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: libpq thread safety
Next
From: Manfred Spraul
Date:
Subject: Re: libpq thread safety