Re: Accessing a database via AJAX scripts - Mailing list pgsql-general

From Tom Lane
Subject Re: Accessing a database via AJAX scripts
Date
Msg-id 27283.1281295452@sss.pgh.pa.us
Whole thread Raw
In response to Re: Accessing a database via AJAX scripts  (Glen Eustace <geustace@godzone.net.nz>)
Responses Re: Accessing a database via AJAX scripts
Re: Accessing a database via AJAX scripts - solved
List pgsql-general
Glen Eustace <geustace@godzone.net.nz> writes:
> Unfortunately your comments don't shed any light on the error I am getting;
> "could not receive data from server: Bad file descriptor".

> This suggests to me that I might have lost the connection in my forked
> perl process to the back-end.  Can you confirm or deny ?

Not on that much evidence; but trying to pass a libpq connection across
a fork is usually risky.  The trouble is that both parent and child
processes now hold copies of the open socket connection, but only one of
them can safely work with it.  It could be that you've closed the libpq
connection in one process and that killed its usability in the other.

            regards, tom lane

pgsql-general by date:

Previous
From: Glen Eustace
Date:
Subject: Re: Accessing a database via AJAX scripts
Next
From: David Fetter
Date:
Subject: Re: Using AND in query