Re: Postgres-Transaction-user_ignore_abort-Connection stop by the client
| From: | Yasuo Ohgaki | Date: | Thu, 17 Oct 2002 06:07:01 +0000 |
| Subject: | Re: Postgres-Transaction-user_ignore_abort-Connection stop by the client | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-120286@lists.php.net to get a copy of this message | ||
Max Buvry wrote:
My script php follows this steps :
ignore_user_abort(0|1)
Compute the key -> v
BEGIN WORK
UPDATE the first bank account with v (credit)
sleep(300)
Make sure you have long enough timeout limit.
UPDATE the second bank account with v+1 (debit)
COMMIT WORK
It works for me. (at least with CVS version)
If there is uncommitted transaction, pgsql module
rollback automatically.
BTW, if you have too long timeout limit, your site
became weaker for DoS attack.
--
Yasuo Ohgaki