• Tom Lane's avatar
    Modify RelationGetBufferForTuple() so that we only do lseek and lock · eedb7d18
    Tom Lane authored
    when we need to move to a new page; as long as we can insert the new
    tuple on the same page as before, we only need LockBuffer and not the
    expensive stuff.  Also, twiddle bufmgr interfaces to avoid redundant
    lseeks in RelationGetBufferForTuple and BufferAlloc.  Successive inserts
    now require one lseek per page added, rather than one per tuple with
    several additional ones at each page boundary as happened before.
    Lock contention when multiple backends are inserting in same table
    is also greatly reduced.
    eedb7d18
bufmgr.c 57.2 KB