Re: PostgreSQL hang on FreeBSD,with CFLAGS='-O2 -pthread' workaround

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL hang on FreeBSD,with CFLAGS='-O2 -pthread' workaround
Дата
Msg-id 11613.1397526760@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL hang on FreeBSD,with CFLAGS='-O2 -pthread' workaround  (Jov <amutu@amutu.com>)
Список pgsql-hackers
Jov <amutu@amutu.com> writes:
> I find some problems when use pg on FreeBSD.On FreeBSD,If installed
> extension which pthread  lib is used,for example plv8,pljava,imcs etc,when
> query touch these extenstions,the PG backend will hang.

> there is a solution,which configure postgresql with CFLAGS='-O2 -pthread'
> and compile pg from source ,then install the extension.But this solution is
> not offical documented and not easy to use(you must compile pg from
> source).It  may make some extension developers or user waste much time to
> solve it,and make people complain that PG or FreeBSD not stable.

> Is it a PG problem and can we fix it?

Sounds more like a bug with FreeBSD's libc and/or libpthread.

In general, we do not and will not support any third-party code that
causes multiple threads to become instantiated inside a PG backend.
So long as these libraries aren't actually forking new threads, you'd
think the presence of libpthread in them would be a non-issue.  It
sounds like the mere presence of libpthread may be changing behavior
somewhere, which I would argue to be a bug in either libpthread or
whatever is changing behavior.

As for building PG itself with -pthread: not bloody likely.  That
would send *entirely* the wrong message about whether threading
is permitted.
        regards, tom lane



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: assertion failure 9.3.4
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: tests for client programs