Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-13 Thread Si Chen
Yes, that would be nice, but it's a big app a lot of which we didn't write, etc.--you can imagine the rest ;) Is there even a way for postgreql to get me all the queries that has gone through a particular process, so we can see what the app was trying to do that left the connection hanging? On

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Michael Paquier
On Thu, Jun 12, 2014 at 11:44 AM, Si Chen sic...@opensourcestrategies.com wrote: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? Not directly. However with 9.3 you could use a background worker like this one:

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Michael Paquier
On Thu, Jun 12, 2014 at 6:34 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Jun 12, 2014 at 11:44 AM, Si Chen sic...@opensourcestrategies.com wrote: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? Not

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen Sent: Wednesday, June 11, 2014 10:44 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? Is there a way to configure postgresql

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Jerry Sievers
Si Chen sic...@opensourcestrategies.com writes: Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? I've seen recent discussion in hackers that this may be added to an upcoming release. On Wed, Jun 11, 2014 at 3:41 PM,

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread Si Chen
: Wednesday, June 11, 2014 10:44 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? On Wed, Jun 11, 2014

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-12 Thread John R Pierce
On 6/12/2014 4:24 PM, Si Chen wrote: PgBouncer looks pretty cool. Do you recommend using it with jdbc with about 50 - 100 normal connections? Java has quite a few built in connection pooling options. they all work best if your software is configured to grab a connection, use it for a

[GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Si Chen
I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query from pg_stat_activity order by query_start; But it showed mostly select statements -- all of them

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Ciba Sadaf
Dnt have any unfrmtn On 11-Jun-2014 9:30 PM, Si Chen sic...@opensourcestrategies.com wrote: I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Jeff Janes
On Wed, Jun 11, 2014 at 8:59 AM, Si Chen sic...@opensourcestrategies.com wrote: I have a problem where postgresql 9.3 got stuck, and the number of postgresql processes increased from about 15 to 225 in 10 minutes. I ran the query: select pid, query_start, waiting, state, query from

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Si Chen
I didn't see any from the log. It was just a whole bunch of pretty standard looking SELECT queries. There were no INSERT/COMMIT statements which were still active before the SELECT's, just a few which are waiting after a lot of SELECT statements. Also, if the process just shows COMMIT, is there

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Igor Neyman
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Si Chen Sent: Wednesday, June 11, 2014 4:34 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? I didn't see any from the log

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Si Chen
: Wednesday, June 11, 2014 4:34 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] what does pg_activity mean when the database is stuck? I didn't see any from the log. It was just a whole bunch of pretty standard looking SELECT queries. There were no INSERT/COMMIT statements which were

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Merlin Moncure
On Wed, Jun 11, 2014 at 5:37 PM, Si Chen sic...@opensourcestrategies.com wrote: The state is idle. I don't have the state_change, but I will try to collect it if it happens again. If they are idle, then the problem is probably with your application -- you're grabbing new connections and not

Re: [GENERAL] what does pg_activity mean when the database is stuck?

2014-06-11 Thread Si Chen
Is there a way to configure postgresql to automatically release connections that have been idle for a set amount of time? On Wed, Jun 11, 2014 at 3:41 PM, Merlin Moncure mmonc...@gmail.com wrote: On Wed, Jun 11, 2014 at 5:37 PM, Si Chen sic...@opensourcestrategies.com wrote: The state is