Re: [GENERAL] Question about Linux, threads, and Postgres

Поиск
Список
Период
Сортировка
От Adam Haberlach
Тема Re: [GENERAL] Question about Linux, threads, and Postgres
Дата
Msg-id 19990131124430.B22196@ricochet.net
обсуждение исходный текст
Ответ на Question about Linux, threads, and Postgres  (Felix Morley Finch <felix@crowfix.com>)
Ответы Re: [GENERAL] Question about Linux, threads, and Postgres  (Felix Morley Finch <felix@crowfix.com>)
Список pgsql-general
On Sat, Jan 30, 1999 at 09:08:14PM -0800, Felix Morley Finch wrote:

> Q 1: Does anyone have experience with Postgres in a threaded program?

    I have done a bit of this under BeOS (where each window gets
its own event loop and thread).  My first program turned out to have
problems in my initial port of the libraries, and in the process
of finding that out I ended up making the app rely on using a single
PgDatabase object protected by a home-brewed locking class.
    In my recent apps I have just been instantiating the PgDatabase
objects wherever needed.  I have not noticed any problems, but I have
also not done much real testing.

> Q 2: Is it necessary and/or sufficient to have only one thread talk to
>      the Postgres library?

    Well, it would be sufficient--I am not sure if it is necessary.
When I get around to cleaning up my hackish port of the client libs
to BeOS, I will keep an eye out for things that could cause problems.


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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: A forward-compatible pg_dump?
Следующее
От: Adam Haberlach
Дата:
Сообщение: Importing to Postgres from Filemaker Pro