Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread safe - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread safe
Date
Msg-id 6094.1073573274@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1044: snprintf() shipped with PostgreSQL is not thread safe  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Responses Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread
Re: BUG #1044: snprintf() shipped with PostgreSQL is not
List pgsql-bugs
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> Some OSes lack proper snprintf()/vsnprintf() fuctions so PostgreSQL includes
> its own version (src/port/snprintf.c) during building. Unfortunately, this
> version of snprintf() is not reentrant (it uses global vars to keep internal
> state), so for example running libpq-based concurrent applications (threads)
> causes libpq fuctions to fail sometimes.

What platforms have workable thread support but not snprintf?  I think
this change is not likely to accomplish much except clutter the snprintf
code ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1044: snprintf() shipped with PostgreSQL is not thread safe
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread