DBTool report options use DB locks

Posted by Stefan Marquardt on 28-Feb-2014 03:27

I noticed that dbtool report option "1. SQL Width & Date Scan w/Report Option" has db locks.
I killed the dbtool and the result was a db shutdown:

[2014/02/27@13:19:32.314+0100] P-12924      T-3388  I DBTOOL  8: (7129)  Usr 8 set name to dbtool.
[2014/02/27@13:21:52.059+0100] P-984        T-2072  I BROKER  0: (2523)  User 8 died with 1 buffers locked.
[2014/02/27@13:21:52.060+0100] P-984        T-2072  I BROKER  0: (15192) The database will complete shutdown within approximately 60 seconds.
[2014/02/27@13:21:52.061+0100] P-984        T-2072  I BROKER  0: (2249)  Begin ABNORMAL shutdown code 2
[2014/02/27@13:21:53.062+0100] P-984        T-2072  I BROKER  0: (2527)  Disconnecting dead user 8.

Why does a report option needs locks?

All Replies

Posted by ChUIMonster on 28-Feb-2014 16:56

This looks like a "latching" crash.  Latches are needed, even when reading, in order to provide a consistent and correct result.  You wouldn't like it very much if user 8 read that block while user 7 was in the midst of changing it.

Posted by gus on 04-Mar-2014 22:59

everything that touches shared memory resident data structures needs to use locks sometimes. this tool has to read database blocks from disk into the buffer pool. so even when it is reading data it has to modify shared data structures.

This thread is closed