Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread safe

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: D(dot)N(dot)Stepanov(at)inp(dot)nsk(dot)su
Cc: "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread safe
Date: 2004-01-08 14:47:54
Message-ID: 6094.1073573274@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2004-01-08 17:15:26 Re: BUG #1044: snprintf() shipped with PostgreSQL is not thread
Previous Message PostgreSQL Bugs List 2004-01-08 07:50:01 BUG #1044: snprintf() shipped with PostgreSQL is not thread safe