Re: thread safety tests

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: thread safety tests
Дата
Msg-id 200406091336.i59DaQv15782@candle.pha.pa.us
обсуждение исходный текст
Ответ на thread safety tests  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: thread safety tests  (Jan Wieck <JanWieck@Yahoo.com>)
Re: thread safety tests  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-hackers
Jan Wieck wrote:
> I am wondering why thread_test.c is checking for mktemp()? That function 
> is nowhere used in the libpq.

Uh, it isn't checking for mktemp, it is using it, and it is using it
because someone didn't like hard-coded paths I was using in the past. 
Is there something wrong with using mktemp?  I have heard of no
portability problems, except some need six X's, and we updated that.

> Also, I would suggest that we allow to build the libpq with thread 
> specific compiler options, even if it is not entirely thread safe. It 
> would require that a really multithreaded application has to have 
> mutexes around certain operations, but being entirely unable to 
> configure in a way that adds thread compile options to the CFLAGS makes 
> libpq completely useless for multithreaded programs on some platforms 
> (for example Solaris).

I am confused what you are suggesting.  Are you saying to use thread
flags but not the other things that make is thread-safe?  There isn't
much else other than the flags actually.  Now that more OS's are
thread-safe by default, we could consider using threading if it is
available by default.  We would need some way of reporting that to the
user, perhaps via an installed readme file or a pg_config output option.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Improving postgresql.conf
Следующее
От: pgsql@mohawksoft.com
Дата:
Сообщение: Re: Improving postgresql.conf