Re: php with postgres - Mailing list pgsql-hackers

From marcus.boerger@t-online.de (Marcus Börger)
Subject Re: php with postgres
Date
Msg-id 1603930091.20030722230537@post.rwth-aachen.de
Whole thread Raw
In response to Re: php with postgres  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Hello Jan,

Tuesday, July 22, 2003, 10:57:56 PM, you wrote:

JW> Bruce Momjian wrote:
>> Marcus B?rger wrote:
>>> However it may be very usefull to terminate any open transaction before
>>> reusing a persisten connection. Typically this happens when the same script
>>> runs again. But anyway using transactions together with persistent conenctions
>>> in a multithreaded environment isn't the best thing you could do. So our
>>> options are
>>> 1) tell the users to do 'auto commit mode'
>>> 2) nested transactions
>>> 3) locking
>>> 
>>> >From my perspective 2) and 3) are bad ideas for the web environment. In other
>>> words i guess we should leave it as is with transaction rollback only when the
>>> client terminates (e.g. the webserver stops).
>> 
>> I don't see why you wouldn't just do BEGIN;COMMIT;RESET ALL; when you
>> pass the connection to a new client.
>> 

JW> Right, and I don't see why using transactions in a multithreaded 
JW> environment would be a bad idea. However an application is designed, one 
JW> logical unit of changes, called a business transaction, has to have one 
JW>   database transaction modifying the business relevant information. 
JW> There could be other transactions involved for dialog handling and 
JW> advisory locking.


So i'll update to "BEGIN;COMMIT;RESET ALL;" :-)

-- 
Best regards,Marcus                            mailto:marcus.boerger@post.rwth-aachen.de



pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: tsearch2 for 7.3.X
Next
From: Oleg Bartunov
Date:
Subject: DBD::Pg, schema support