Re:Connections hang indefinitely while taking a gin index's LWLock buffer_content lock

2018-12-13 Thread chjis...@163.com
hiI Have a question. Why the order of unlocking is not adjusted in this patch? like this:if (BufferIsValid(lbuffer))UnlockReleaseBuffer(lbuffer);if (BufferIsValid(pbuffer))UnlockReleaseBuffer(pbuffer);if (BufferIsValid(dbuffer))UnlockReleaseBuffer(dbuffer);==>if (BufferIsValid(pbuffer))UnlockReleas

Re:Connections hang indefinitely while taking a gin index's LWLock buffer_content lock

2018-11-06 Thread chenhj
Hi,all I analyzed the btree block where lwlock deadlock occurred, as follows: ## insert process(ginInsertValue()) 644(root blkno) | 7054(2. held LWLock:0x2aaac587ae64) rightlink>(3. Acquire LWLock:0x2aaab4009564,buffer = 2119