Transactions and HTTP

From: Raj Mathur <raju(at)linux-delhi(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Transactions and HTTP
Date: 2003-01-21 04:33:14
Message-ID: 15916.52618.390720.567048@mail.linux-delhi.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)kandalaya(dot)org http://kandalaya.org/
It is the mind that moves

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah. 2003-01-21 05:27:52 Re: deadlock problem in Ad serving..
Previous Message Andrew Biagioni 2003-01-21 03:46:54 Re: