title: How to truncate big table in postgresql having size greater than 5231MB?
body: <p>Already tried delete and truncate but it took ever long time. Also tried to find out any lock process is there on that table using the below query</p>
  
  <pre><code>SELECT bl.pid          AS blocked_pid,
           a.usename       AS blocked_user,
           kl.pid          AS blocking_pid,
           ka.usename      AS blocking_user,
           a.current_query AS blocked_statement
    FROM  pg_catalog.pg_locks         bl
     JOIN pg_catalog.pg_stat_activity a  ON a.procpid = bl.pid
     JOIN pg_catalog.pg_locks         kl ON kl.transactionid = bl.transactionid AND kl.pid != bl.pid
     JOIN pg_catalog.pg_stat_activity ka ON ka.procpid = kl.pid
    WHERE NOT bl.GRANTED;
  </code></pre>
  
  <p>which doesn't return any row</p>