Skip site navigation (1) Skip section navigation (2)

Re: Built-in connection pool

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-hackers(at)postgresql(dot)org>, "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: Built-in connection pool
Date: 2010-06-28 15:32:20
Message-ID: 4C287A340200002500032BED@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-hackers
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

In response to

pgsql-hackers by date

Next:From: Mike RylanderDate: 2010-06-28 15:42:15
Subject: Re: Issue: Deprecation of the XML2 module 'xml_is_well_formed' function
Previous:From: Andrew DunstanDate: 2010-06-28 15:19:19
Subject: Re: pg_dump's checkSeek() seems inadequate

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group