[pgpool-general: 1399] Re: SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'import_jobs' AND c.relpersistence = 'u' sort of hangs.
David Kerr
web at mr-paradox.net
Sun Feb 17 02:39:51 JST 2013
On Feb 16, 2013, at 2:09 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
>> Howdy!
>>
>> I posted this to the PG general list and it was suggested that I ask it here instead.
>>
>> I'll add the additional detail that this only seems to happen with jruby (jdbc) and not with ruby. Any ideas?
>>
>> This query is coming from PgPool I believe.
>>
>> SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'import_jobs' AND c.relpersistence = 'u'
>>
>> This is a very small database, like 10/15 tables, it's basically empty.
>> If i run this query manually, it comes back immediatly.
>> However according to this it's been running for about an hour.
>>
>> v3=# select now();
>> now
>> -------------------------------
>> 2013-02-15 21:49:34.470466+00
>> (1 row)
>>
>> -[ RECORD 5
>> +]----+---------------------------------------------------------------------------------------------------------
>> datid | 16389
>> datname | v3
>> pid | 13905
>> usesysid | 20415
>> usename | workling
>> application_name |
>> client_addr | 10.0.0.132
>> client_hostname |
>> client_port | 58009
>> backend_start | 2013-02-15 20:49:09.098768+00
>> xact_start | 2013-02-15 20:49:09.189625+00
>> query_start | 2013-02-15 20:49:09.198742+00
>> state_change | 2013-02-15 20:49:09.198743+00
>> waiting | f
>> state | active
>> query | SELECT count(*) FROM pg_catalog.pg_class AS c WHERE c.relname = 'import_jobs' AND
>> +c.relpersistence = 'u'
>>
>> (I actually restarted the application and now there are 4 of these)
>>
>> Any idea why the query would hang like this?
>>
>> I don't see it waiting on locks or anything like that.
>>
>> any ideas?
>
> Yes, the query is generated by pgpool-II.
> What pgpool and PostgreSQL version?
>
> What does ps command show?
>
> ps aux|grep pgpool
>
the pgpool processes show idle.
Postgres 9.2.3 / Pgpool 3.2.2
pgpool 26806 0.0 0.3 81036 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37890) idle
pgpool 26808 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37844) idle
pgpool 26809 0.0 0.3 81036 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37888) idle
pgpool 26810 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37884) idle
pgpool 26811 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37883) idle
pgpool 26812 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37881) idle
pgpool 26813 0.0 0.3 81036 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37867) idle
pgpool 26815 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37875) idle
pgpool 26816 0.0 0.3 81032 5644 ? S Feb14 0:00 pgpool: workling v3 10.0.0.203(37874) idle
pgpool 28685 0.0 0.3 81024 5572 ? S Feb15 0:02 pgpool: workling v3 10.0.0.203(37841) idle
pgpool 28686 0.0 0.3 81024 5592 ? S Feb15 0:01 pgpool: workling v3 10.0.0.203(40680) idle
pgpool 28687 0.0 0.3 81024 5512 ? S Feb15 0:00 pgpool: workling v3 10.0.0.203(37821) idle
pgpool 29774 0.0 0.3 81036 5372 ? S 06:35 0:00 pgpool: workling v3 10.0.0.203(41337) idle
pgpool 29805 0.0 0.3 81036 5372 ? S 06:59 0:00 pgpool: workling v3 10.0.0.203(41335) idle
pgpool 29807 0.0 0.3 81036 5372 ? S 07:00 0:00 pgpool: workling v3 10.0.0.203(41334) idle
pgpool 29808 0.0 0.3 81032 5372 ? S 07:00 0:00 pgpool: workling v3 10.0.0.203(41318) idle
pgpool 29809 0.0 0.3 81036 5372 ? S 07:00 0:00 pgpool: workling v3 10.0.0.203(41325) idle
pgpool 29852 0.0 0.1 77772 2212 ? S 07:18 0:00 pgpool: workling v3 10.0.0.203(43660) idle
postgres 10535 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55120) idle
postgres 10539 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55127) idle
postgres 10540 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55129) idle
postgres 10542 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55131) SELECT
postgres 10543 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55133) idle
postgres 10544 6569 0 Feb15 ? 00:00:01 postgres: workling v3 10.0.0.195(55135) SELECT
postgres 10545 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55137) idle
postgres 10546 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55139) SELECT
postgres 10547 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55141) SELECT
postgres 10548 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55143) idle
postgres 10549 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(55145) SELECT
postgres 13122 6569 0 Feb15 ? 00:00:00 postgres: workling v3 10.0.0.195(56408) idle
postgres 27673 6569 0 08:45 ? 00:00:00 postgres: workling v3 10.0.0.195(35288) idle
postgres 27702 6569 0 08:46 ? 00:00:00 postgres: workling v3 10.0.0.195(35305) SELECT
postgres 27704 6569 0 08:46 ? 00:00:00 postgres: workling v3 10.0.0.195(35309) SELECT
postgres 27706 6569 0 08:46 ? 00:00:00 postgres: workling v3 10.0.0.195(35311) SELECT
postgres 27707 6569 0 08:46 ? 00:00:00 postgres: workling v3 10.0.0.195(35313) SELECT
postgres 27708 6569 0 08:46 ? 00:00:00 postgres: workling v3 10.0.0.195(35315) SELECT
More information about the pgpool-general
mailing list