Thread

  1. heap_freeze_tuple locking requirements

    Robert Haas <robertmhaas@gmail.com> — 2012-03-22T00:50:24Z

    heap_freeze_tuple() was apparently designed at one point to cope with
    being called with either a shared or exclusive buffer lock.  But none
    of the current callers call it with a shared lock; they all call it
    with an exclusive lock, except for the heap-rewrite code which doesn't
    take (or need) a lock at all.  But, meanwhile, the comments for that
    function claim that vacuum does call it that way, which is incorrect,
    and AFAICT has been at least since HOT went in.  Attached is a
    proposed patch that cleans all of this up by removing support for
    calling it with just a shared lock and removing or adjusting various
    related comments.
    
    Since this is just dead code removal, I propose to apply this to 9.2.
    
    -- 
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company
    
  2. Re: heap_freeze_tuple locking requirements

    Alvaro Herrera <alvherre@commandprompt.com> — 2012-03-23T15:02:18Z

    Excerpts from Robert Haas's message of mié mar 21 21:50:24 -0300 2012:
    > heap_freeze_tuple() was apparently designed at one point to cope with
    > being called with either a shared or exclusive buffer lock.  But none
    > of the current callers call it with a shared lock; they all call it
    > with an exclusive lock, except for the heap-rewrite code which doesn't
    > take (or need) a lock at all.
    
    > Since this is just dead code removal, I propose to apply this to 9.2.
    
    +1
    
    -- 
    Álvaro Herrera <alvherre@commandprompt.com>
    The PostgreSQL Company - Command Prompt, Inc.
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
    
    
  3. Re: heap_freeze_tuple locking requirements

    Robert Haas <robertmhaas@gmail.com> — 2012-03-26T15:06:18Z

    On Fri, Mar 23, 2012 at 11:02 AM, Alvaro Herrera
    <alvherre@commandprompt.com> wrote:
    > Excerpts from Robert Haas's message of mié mar 21 21:50:24 -0300 2012:
    >> heap_freeze_tuple() was apparently designed at one point to cope with
    >> being called with either a shared or exclusive buffer lock.  But none
    >> of the current callers call it with a shared lock; they all call it
    >> with an exclusive lock, except for the heap-rewrite code which doesn't
    >> take (or need) a lock at all.
    >
    >> Since this is just dead code removal, I propose to apply this to 9.2.
    >
    > +1
    
    Thanks, done.
    
    -- 
    Robert Haas
    EnterpriseDB: http://www.enterprisedb.com
    The Enterprise PostgreSQL Company