Re: Postgres-Transaction-user_ignore_abort-Connection stop by theclient

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux