<div dir="ltr"><div>Hi,<br><br>I'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 = <tablename> AND c.relnamespace = n.oid AND n.nspname ~ '^pg_temp_'<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 'active' state) well over 10 minutes, without being held by lock or whatever. <br><br></div><div>I'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'm misunderstanding something?<br><br></div><div>Thanks!<br></div><div>Petr <br></div></div>