RDBMS Information - PostgreSQL - How to identify the process locking a schema

Purpose of Query

The purpose of this query is to check if any process is locking a schema

Applicable CAST Version

ReleaseYes/No
8.1.x
8.0.x
7.3.x

Applicable RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS2

Query for CSS

select * from pg_locks

Query result example

“relation”;12002;11069;;;"";;;;;“44/85673”;6468;“AccessShareLock”;t;t

Query result interpretation

It gives the ID of the process , lock type , date on which it was locked and Username

Notes/comments

Related Pages