X lock on table

Navin_CNavin_C Vertica Customer
Hello All, I am trying to truncate a table in Vertica The table has 300 records.
truncate table testable ;
When I fire this query the query does not execute and does not give nay results, after a short a while of time I have to terminate the query by using Ctrl+C When I do Ctrl+C
  Cancel request sent  ROLLBACK 2327:  Canceled: [Txn 0xe0000000020437] O lock table - canceled Canceled lock wait for Table:testable
I have checked with Locks table this is what it gives
  nnani=> select * from locks;                                             node_names                                            |            object_name            |     object_id     |  transaction_id   |                    transaction_description                     | lock_mode | lock_scope  |      request_timestamp       |        grant_timestamp  -------------------------------------------------------------------------------------------------+-----------------------------------+-------------------+-------------------+----------------------------------------------------------------+-----------+-------------+------------------------------+-------------------------------   node0001,node0002,node0003,node0004,node0005,node0006 | Table:testable | 45035996276482302 | 67553994410654689 | Txn: f0000000017be1 'delete from testable;' | X         | TRANSACTION | 2013-08-27 06:23:59.59236-05 | 2013-08-27 06:23:59.592371-05  (1 row)  
I think this is because of delete query on testable. Can anybody help me release this lock and let me know the cause of this.


  • Hello Navin Session closed without committing . You can kill the session by using the command select close_session(''); Thanks Bhawana

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file