I wrote:
 
> When preparing to deal with a new statement:
>  - acquire lockX
>  - if not a superuser
>  - and not in an active transaction
>  - and countX >= max_active_transactions
>  -   place current process at tail of waitX queue, and block
>  -   (lockX would be released while blocked)
>  - increment countX
>  - release lockX
 
There's a bug there already.  This should be better:
 - if not in an active transaction
 -   acquire lockX
 -   if not a superuser
 -   and countX >= max_active_transactions
 -     place current process at tail of waitX queue, and block
 -     (lockX would be released while blocked)
 -   increment countX
 -   release lockX
 
-Kevin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to