]> granicus.if.org Git - postgresql/commit
Create VXID locks "lazily" in the main lock table.
authorRobert Haas <rhaas@postgresql.org>
Thu, 4 Aug 2011 16:38:33 +0000 (12:38 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 4 Aug 2011 16:38:33 +0000 (12:38 -0400)
commit84e37126770dd6de903dad88ce150a49b63b5ef9
tree6f18f1599033b0c29687c0a49f18df6e8bc0a8c8
parent3b17efdfdd846c9bfad1637686e6f18198ea3df5
Create VXID locks "lazily" in the main lock table.

Instead of entering them on transaction startup, we materialize them
only when someone wants to wait, which will occur only during CREATE
INDEX CONCURRENTLY.  In Hot Standby mode, the startup process must also
be able to probe for conflicting VXID locks, but the lock need never be
fully materialized, because the startup process does not use the normal
lock wait mechanism.  Since most VXID locks never need to touch the
lock manager partition locks, this can significantly reduce blocking
contention on read-heavy workloads.

Patch by me.  Review by Jeff Davis.
src/backend/commands/indexcmds.c
src/backend/postmaster/autovacuum.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/README
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/include/storage/lmgr.h
src/include/storage/lock.h
src/include/storage/proc.h
src/include/storage/sinvaladt.h