Qingqing Zhou <[EMAIL PROTECTED]> writes:
> Attached is a patch to remove the lock protection for
> HeapTupleSatisfiesVacuum() in index code.

This patch scares the heck out of me.  You need to offer some pretty
compelling performance reasons before I'd accept any part of it,
most especially this:

*** bufmgr.c    14 Apr 2006 03:38:55 -0000      1.207
--- bufmgr.c    6 Jun 2006 02:07:09 -0000
***************
*** 1686,1693 ****
        bufHdr = &BufferDescriptors[buffer - 1];
  
        Assert(PrivateRefCount[buffer - 1] > 0);
-       /* here, either share or exclusive lock is OK */
-       Assert(LWLockHeldByMe(bufHdr->content_lock));
  
        /*
         * This routine might get called many times on the same page, if we are
--- 1686,1691 ----

Changing a buffer you hold no lock on is a recipe for disaster.

Where is the performance-boost evidence that suggests we should
even take the time to analyze whether this is safe?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to