pgsql: Avoid unnecessary page-level SSI lock check in heap_insert().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid unnecessary page-level SSI lock check in heap_insert().
Date: 2011-09-16 18:47:44
Message-ID: E1R4dRw-00041P-1V@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid unnecessary page-level SSI lock check in heap_insert().

As observed by Heikki, we need not conflict on heap page locks during an
insert; heap page locks are only aggregated tuple locks, they don't imply
locking "gaps" as index page locks do. So we can avoid some unnecessary
conflicts, and also do the SSI check while not holding exclusive lock on
the target buffer.

Kevin Grittner, reviewed by Jeff Davis. Back-patch to 9.1.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/e5b86c93b66b5caeb25a65bae26b04fc7a068957

Modified Files
--------------
src/backend/access/heap/heapam.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-09-16 20:36:10 pgsql: Add FORCE_NOT_NULL support to the file_fdw foreign data wrapper.
Previous Message Tom Lane 2011-09-16 16:31:50 pgsql: Ensure generic plan gets used for a plpgsql expression with no p