Transactions and HTTP - Mailing list pgsql-admin

From Raj Mathur
Subject Transactions and HTTP
Date
Msg-id 15916.52618.390720.567048@mail.linux-delhi.org
Whole thread Raw
Responses Re: Transactions and HTTP  (Thomas Swan <tswan@idigx.com>)
List pgsql-admin
Hi,

Writing a web-based application using PostgreSQL as the back-end
database.  The master create functions look something like this:

1. Accept ID from user.

2. Verify that ID doesn't exist in database.  Start transaction.
Create blank record with ID as key.

3. Accept remaining data for record from user.

4. Enter data into newly-created blank record.  End transaction.

Firstly,is it possible to have a transaction spanning multiple
instances of the CGI/mod_perl invocations?

Second, there are issues if the user session terminates for some
reason (e.g. user goes offline after the blank record has been
created, etc.) and I end up with a locked blank record in the
database.  Would appreciate pointers to best practises in handling
this paradigm.

Unrelated, but I find at least 3 different interfaces to PostgreSQL
from Perl: DBI, Pg and PgSQL.  I'm using Pg at the moment, since that
ships with PgSQL by default with Red Hat, but are there any reasons to
choose one over the other?

Regards,

-- Raju
--
Raj Mathur                raju@kandalaya.org      http://kandalaya.org/
                      It is the mind that moves

pgsql-admin by date:

Previous
From: Andrew Biagioni
Date:
Subject: Re:
Next
From: "Rajesh Kumar Mallah."
Date:
Subject: Re: deadlock problem in Ad serving..