Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Einar Már Björvinsson <emb(at)media(dot)is>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2004-11-08 01:13:45
Message-ID: 25493.1099876425@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?Einar_M=E1r_Bj=F6rvinsson?= <emb(at)media(dot)is> writes:
> The program starts by opening a connection to the database, enter the =
> infinite while loop to run some functions.=20

> Inside the while loop it forks many childs which then call one function =
> from the library I made.

Are you trying to say that you are opening a database connection in the
parent process and passing it down for the children to play around with?
This is a fairly bad idea, unless you have an interlock mechanism to
ensure that only one child uses it at a time.

> It is as if the handle to the connection is not valid any more.=20

Perhaps the child is closing the connection when it's done with it.

regards, tom lane

In response to

  • at 2004-11-02 09:00:58 from Einar Már Björvinsson

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2004-11-08 01:14:35 Re: Postresql RFD version 2.0 Help Wanted.
Previous Message Tom Lane 2004-11-08 01:07:40 Re: dumping on 7.4.6 importing on 7.4.1