Search Postgresql Archives

Re: Looking for software to 'enqueue' connections

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

 



On 8/15/2016 1:30 PM, Edmundo Robles wrote:
I want find a software to 'enqueue' the client connections to database, so if i reach the max limit the query must be holding in a queue until one connection is released.


pgbouncer is the correct answer, you may need to play about with the configuration a bit. there's a few modes that might work, ideally, write your apps to connect to postgres, do a transaction, and disconnect, and limit the pool size so only so many connections can be active at a time. the other mode is to allow the clients to stay connected to the pool, but have a limited number of actual database connections that you allocate on a transaction basis.

I have many devices (100+) saving their state to a database, each minute, but the table is too large more than 13,000,000 of records and many indexes, so, insert one record takes 3 or more minutes.

that sounds terrible. single row inserts shouldn't *ever* take 3 minutes, if you have clients inserting a row a minute. you may need faster disk storage, you may need to improve postgres tuning.

'many indexes' ? how many ? too many indexes would definitely slow inserts down.


--
john r pierce, recycling bits in santa cruz



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux