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

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

From
Tom Lane
Date:
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(-)