Re: Transactions and web applications - Mailing list pgsql-general

From Lincoln Yeoh
Subject Re: Transactions and web applications
Date
Msg-id 3.0.5.32.20000623144638.0090f340@pop.mecomb.po.my
Whole thread Raw
List pgsql-general
Hi people,

What are the recommended ways to do transactions in web applications?

Right now I have persistent database connections, but currently they are
shared by multiple sessions. So I make sure that database level
transactions are closed after each page/http request.

In theory I could tie database connections to sessions, but then if I have
1000 outstanding (not necessarily active) sessions that would mean 1000
database connections, and 1000 postgres backend processes right? Ouch!

Because of this it looks like I may actually have to do application level
transactions instead of being able to rely solely on database level
transactions.

Am I missing something? Are there better/good alternatives?

Would it be possible to "name" transactions and continue them from other
database connections? Sounds impractical tho- what happens if two
connections try to continue a transaction at overlapping times :) (user
opens up multiple browsers from one page).

Cheerio,
Link.


pgsql-general by date:

Previous
From: Lincoln Yeoh
Date:
Subject: Re: How to select a row and an adjacent row?
Next
From: Dustin Sallings
Date:
Subject: Re: How to select a row and an adjacent row?