Re: Multi-threaded user app segfaults when using libpq with separate connections

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multi-threaded user app segfaults when using libpq with separate connections
Дата
Msg-id 2778.1060012055@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Multi-threaded user app segfaults when using libpq with separate connections  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Ответы Re: Multi-threaded user app segfaults when using libpq with separate connections  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Список pgsql-interfaces
Frank van Vugt <ftm.van.vugt@foxi.nl> writes:
> // PostgreSQL header <catalog/pg_type.h> redefines errno erroneously.
> #if defined(errno)
> # undef errno
> #endif
> #define errno qt_psql_errno
> #include <catalog/pg_type.h>
> #undef errno

It seems highly unlikely that the above is a good idea.  errno is a
macro on all threaded platforms I'm aware of, but the above coding
forgets the definition.  The behavior complained of in the comment
is gone anyway in PG 7.3.

Not sure that this explains your problem though.

There are several places in libpq that invoke libc routines that are
not thread-safe (on most platforms anyway).  We have attempted to
rectify this for PG 7.4.  You may care to try your test with CVS tip and
see if it works better.
        regards, tom lane


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Frank van Vugt
Дата:
Сообщение: Multi-threaded user app segfaults when using libpq with separate connections
Следующее
От: Daniel Brozek
Дата:
Сообщение: unicode and libpq