1

I am truncating a large table - a few Terrabytes in size. To ensure that there are no locking issues, I executed the following query in another window and the results are also there. Why isn't the table begin truncated no there is the query result?

select  c.relname,
l.locktype,
l.pid,
l.mode,
l.granted   FROM pg_locks l
 JOIN pg_class c ON l.relation = c.oid;
              relname              | locktype | pid  |      mode       | granted 
-----------------------------------+----------+------+-----------------+---------
 pg_class_tblspc_relfilenode_index | relation | 6931 | AccessShareLock | t
 pg_class_relname_nsp_index        | relation | 6931 | AccessShareLock | t
 pg_class_oid_index                | relation | 6931 | AccessShareLock | t
 pg_class                          | relation | 6931 | AccessShareLock | t
 pg_locks                          | relation | 6931 | AccessShareLock | t

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.