Sha256: 5866178dcde45928866de0fa24f7bfc4b2bdcb0b3fa471658f6a273ce7bedbf4

Contents?: true

Size: 559 Bytes

Versions: 21

Compression:

Stored size: 559 Bytes

Contents

/* Queries with active locks */

SELECT
  pg_stat_activity.pid,
  pg_class.relname,
  pg_locks.transactionid,
  pg_locks.granted,
  pg_locks.mode,
  pg_stat_activity.query AS query_snippet,
  age(now(),pg_stat_activity.query_start) AS "age",
  pg_stat_activity.application_name AS application
FROM pg_stat_activity,pg_locks left
OUTER JOIN pg_class
  ON (pg_locks.relation = pg_class.oid)
WHERE pg_stat_activity.query <> '<insufficient privilege>'
  AND pg_locks.pid = pg_stat_activity.pid
  AND pg_stat_activity.pid <> pg_backend_pid() order by query_start;

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ruby-pg-extras-5.3.1 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.3.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.5 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.4 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.3 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.2 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.1 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.2.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.1.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-5.0.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.13.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.12.2 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.12.1 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.12.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.11.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.10.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.9.0 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.8.1 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.7.2 lib/ruby_pg_extras/queries/all_locks.sql
ruby-pg-extras-4.7.1 lib/ruby_pg_extras/queries/all_locks.sql