There is no LWLock protecting the spinlock in UnpinBuffer(), so we need do
so ourselves. I also checked other NoHoldOff spinlock, seems they are ok.

Regards,
Qingqing

Index: bufmgr.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v
retrieving revision 1.200
diff -c -r1.200 bufmgr.c
*** bufmgr.c    22 Nov 2005 18:17:19 -0000      1.200
--- bufmgr.c    28 Dec 2005 09:33:18 -0000
***************
*** 812,817 ****
--- 812,818 ----
                Assert(!LWLockHeldByMe(buf->io_in_progress_lock));

                /* NoHoldoff ensures we don't lose control before sending 
signal */
+               HOLD_INTERRUPTS();
                LockBufHdr_NoHoldoff(buf);

                /* Decrement the shared reference count */
***************
*** 847,852 ****
--- 848,856 ----
                else
                        UnlockBufHdr_NoHoldoff(buf);

+               /* safe to accept interrupts now */
+               RESUME_INTERRUPTS();
+
                /*
                 * If VACUUM is releasing an otherwise-unused buffer, send it 
to the
                 * freelist for near-term reuse.  We put it at the tail so that 
it


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to