Re: [GENERAL] Question about Linux, threads, and Postgres - Mailing list pgsql-general

From Adam Haberlach
Subject Re: [GENERAL] Question about Linux, threads, and Postgres
Date
Msg-id 19990131124430.B22196@ricochet.net
Whole thread Raw
In response to Question about Linux, threads, and Postgres  (Felix Morley Finch <felix@crowfix.com>)
Responses Re: [GENERAL] Question about Linux, threads, and Postgres  (Felix Morley Finch <felix@crowfix.com>)
List 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 by date:

Previous
From: Herouth Maoz
Date:
Subject: A forward-compatible pg_dump?
Next
From: Adam Haberlach
Date:
Subject: Importing to Postgres from Filemaker Pro