<div dir="ltr"><div>Hi,<br><br>I&#39;ve noticed strange long running queries on our PostgreSQL (9.4.4) running with  PgPool-II (3.4.3). Quite frequently there are queries like<br><br>SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.relname = &lt;tablename&gt; AND c.relnamespace = n.oid AND n.nspname ~ &#39;^pg_temp_&#39;<br><br></div><div>in the pg_stat_activity view. I assume, these are PgPool-II checks to identify temp tables on the master (which can be enabled/disabled by check_temp_table config switch). The strange thing about it is, that sometimes the query hangs in the view (in &#39;active&#39; state) well over 10 minutes, without being held by lock or whatever. <br><br></div><div>I&#39;ve checked the running postgres process with strace and it is in the recvfrom() on the socket with the PgPool-II connection.<br></div><div>Running the query localy takes milliseconds (as expected).<br><br></div><div>Have anyone encountered such behaviour, or is it to be expected and I&#39;m misunderstanding something?<br><br></div><div>Thanks!<br></div><div>Petr <br></div></div>