Hi guys,
postgresql-8.2-505.jdbc3.jar
hibernate3.jar
I'm getting this form
ps aux:
Code:
postgres 18490 S Mar07 0:00 postgres: 127.0.0.1(52783) idle in transaction
postgres 30755 S Mar07 0:00 postgres: 127.0.0.1(48223) idle in transaction
postgres 666 S Mar07 0:01 postgres: 127.0.0.1(38756) idle in transaction
postgres 14576 S Mar07 0:00 postgres: 127.0.0.1(55468) idle in transaction
postgres 23865 S 01:48 0:00 postgres: 127.0.0.1(55478) idle in transaction
Now, after extensive searching I found these helpfull queries and ran them all and got nothing :(
Code:
select pg_stat_activity.datname,pg_class.relname,pg_locks.transaction, pg_locks.mode, pg_locks.granted,pg_stat_activity.usename,substr(pg_stat_activity.current_query,1,30), pg_stat_activity.query_start, age(now(),pg_stat_activity.query_start) as "age", pg_stat_activity.procpid from pg_stat_activity,pg_locks left outer join pg_class on (pg_locks.relation = pg_class.oid) where pg_locks.pid=pg_stat_activity.procpid order by query_start;
datname | relname | transaction | mode | granted | usename | substr | query_start | age | procpid
-----------+------------------+-------------+-----------------+---------+-----------+--------+------------------------------+-----------------+---------
preferans | pg_stat_activity | 87688518 | AccessShareLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
preferans | pg_database | 87688518 | AccessShareLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
preferans | | 87688518 | ExclusiveLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
preferans | pg_locks | 87688518 | AccessShareLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
preferans | pg_authid | 87688518 | AccessShareLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
preferans | pg_class | 87688518 | AccessShareLock | t | preferans | <IDLE> | 2009-03-08 12:48:53.47722+01 | 00:08:35.799393 | 2793
Code:
SELECT pg_class.relname AS table, pg_database.datname AS database, transaction, pid, mode, granted FROM pg_locks, pg_class, pg_database WHERE pg_locks.relation = pg_class.oid AND pg_locks.database = pg_database.oid;
table | database | transaction | pid | mode | granted
----------+-----------+-------------+------+-----------------+---------
pg_class | preferans | 87688589 | 2793 | AccessShareLock | t
pg_locks | preferans | 87688589 | 2793 | AccessShareLock | t
Code:
select pg_class.relname,pg_locks.* from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation;
relname | locktype | database | relation | page | tuple | transactionid | classid | objid | objsubid | transaction | pid | mode | granted
----------+----------+----------+----------+------+-------+---------------+---------+-------+----------+-------------+------+-----------------+---------
pg_locks | relation | 16385 | 10342 | | | | | | | 87688647 | 2793 | AccessShareLock | t
pg_class | relation | 16385 | 1259 | | | | | | | 87688647 | 2793 | AccessShareLock | t
Code:
SELECT relation, transaction, pid, mode, granted, relname FROM pg_locks INNER JOIN pg_stat_user_tables ON pg_locks.relation = pg_stat_user_tables.relid;
relation | transaction | pid | mode | granted | relname
----------+-------------+-----+------+---------+---------
(0 rows)
Code:
select pg_class.relname, pg_locks.transaction, pg_locks.mode, pg_locks.granted as "g", pg_stat_activity.current_query, pg_stat_activity.query_start, age(now(),pg_stat_activity.query_start) as "age", pg_stat_activity.procpid from pg_stat_activity,pg_locks left outer join pg_class on (pg_locks.relation = pg_class.oid) where pg_locks.pid=pg_stat_activity.procpid order by query_start;
relname | transaction | mode | g | current_query | query_start | age | procpid
------------------+-------------+-----------------+---+---------------+-------------------------------+-----------------+---------
pg_stat_activity | 87688780 | AccessShareLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
pg_authid | 87688780 | AccessShareLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
pg_class | 87688780 | AccessShareLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
pg_database | 87688780 | AccessShareLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
pg_locks | 87688780 | AccessShareLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
| 87688780 | ExclusiveLock | t | <IDLE> | 2009-03-08 12:58:39.725985+01 | 00:00:12.221831 | 2793
I used these in the last few days and was able to get some useful info and went into my code and fixed it...but now I get nothing useful :chomp:
Any ideas? Or is this a PostgreSQL issue I'm having?
THANKS!!!