Re: Accessing a database via AJAX scripts

From: Glen Eustace <geustace(at)godzone(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Accessing a database via AJAX scripts
Date: 2010-08-08 21:08:32
Message-ID: 4C5F1CD0.4040805@godzone.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> 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.

Thanks Tom, that is pretty much the conclusion I came to. I think I
need to close the db connection prior to the fork and then re-open in
the new child.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Glen and Rosanne Eustace
GodZone Internet Services, a division of AGRE Enterprises Ltd.
P.O. Box 8020, Palmerston North, New Zealand 4446.
Ph: +64 6 357 8168, Fax +64 6 357 8165, Mob: +64 27 542 4015
http://www.godzone.net.nz

"A Ministry specialising in providing low-cost Internet Services
to NZ Christian Churches, Ministries and Organisations."

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2010-08-08 22:08:05 Re: Using AND in query
Previous Message Jose Maria Terry 2010-08-08 20:05:42 Re: Help with select with max and min please