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

From Glen Eustace
Subject Re: Accessing a database via AJAX scripts
Date
Msg-id 4C5F003F.9030408@godzone.net.nz
Whole thread Raw
In response to Re: Accessing a database via AJAX scripts  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Accessing a database via AJAX scripts
List pgsql-general
Hi Tom,

On 08/09/2010 03:33 AM, Tom Lane wrote:

> Your note is awfully short of concrete details, but I'm guessing the
> basic reason why this wasn't working for you was you were doing all the
> operations as a single transaction.  The results of that transaction
> wouldn't be visible to another one until it commits; so in particular
> whatever changes it made in the status table wouldn't be visible.
> You'd need to break the processing into something like
>     begin;
>     insert into status values ('working');
>     commit;
>     begin;
>     ... do the useful stuff here ...
>     commit;
>     begin;
>     insert into status values ('done');
>     commit;

Yes, it was a bit vague but I didn't want to go into too much detail as
I am still not sure I am even dealing with a postgresql issue.

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 ?  This might
give me some idea of where to keep looking.

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

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

pgsql-general by date:

Previous
From: Lew
Date:
Subject: Re: could you tell me this..?
Next
From: Tom Lane
Date:
Subject: Re: Accessing a database via AJAX scripts