What's up guys. I have a couple of tables where i inserting much of data (and almost never deleting). Periodically i see that insert gains ExclusiveLock on index of table. So i guess that sometimes insert triggers reindex of table. So i wonder how often it happens and how can i see in logs how much time it took and how often it is triggered? Maybe some blogs/docs on it ? thanks in advance.
There is no automatic reindexing. What you are probably seeing is an exclusive lock on the right to extend the index (add a new 8 kB block to the end of it), not on the index itself.
What tool are you using to observe these locks? Does it give a 'locktype' field or something similar?