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

From: Adam Haberlach <haberlaa(at)ricochet(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Question about Linux, threads, and Postgres
Date: 1999-01-31 20:44:30
Message-ID: 19990131124430.B22196@ricochet.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Haberlach 1999-01-31 20:49:53 Importing to Postgres from Filemaker Pro
Previous Message Herouth Maoz 1999-01-31 16:37:46 A forward-compatible pg_dump?