Discussion:
<idle> question
Emi Lu
2014-10-06 15:07:46 UTC
Permalink
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>Hello List, <br>
<br>
May I know will &lt;idle&gt; cause any potential performance
issues for psql8.3 please?<br>
version (PostgreSQL 8.3.18 on x86_64-unknown-linux-gnu, compiled
by GCC 4.1.2)<br>
<br>
E.g., got 10 idle connections for 10 days. <br>
&nbsp;select current_query from pg_stat_activity&nbsp; where usename
='test';<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
current_query&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
--------------------------------------------------------------------------<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
&nbsp;&lt;IDLE&gt;<br>
<br>
Thanks a lot!<br>
Emi</small>
</body>
</html>
Andy Colson
2014-10-06 15:15:44 UTC
Permalink
Post by Emi Lu
Hello List,
May I know will <idle> cause any potential performance issues for
psql8.3 please?
version (PostgreSQL 8.3.18 on x86_64-unknown-linux-gnu, compiled by GCC
4.1.2)
E.g., got 10 idle connections for 10 days.
select current_query from pg_stat_activity where usename ='test';
current_query
--------------------------------------------------------------------------
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
<IDLE>
Thanks a lot!
Emi
idle is ok. It wastes a little extra ram, but wont hurt anything.
"idle in transaction" for long periods of time is bad.

-Andy
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Jim Nasby
2014-10-06 22:08:41 UTC
Permalink
Post by Emi Lu
Hello List,
May I know will <idle> cause any potential performance issues for
psql8.3 please?
version (PostgreSQL 8.3.18 on x86_64-unknown-linux-gnu, compiled by GCC
4.1.2)
FYI, 8.3 is almost 7 years old and is no longer supported. I strongly suggest that you upgrade to something more recent.
Post by Emi Lu
E.g., got 10 idle connections for 10 days.
idle is ok. It wastes a little extra ram, but wont hurt anything. "idle in transaction" for long periods of time is bad.
It's more than just memory. Each connection has a slot in the proc array and there's places in the code that are pretty sensitive to how big that array gets. There's some other structures that have this issue as well. 10 extra connections won't mean much; 1000 certainly would.
--
Jim Nasby, Data Architect, Blue Treble
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...