]> granicus.if.org Git - postgresql/commit
Resolve timing issue with logging locks for Hot Standby.
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 1 Feb 2012 09:33:16 +0000 (09:33 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 1 Feb 2012 09:33:16 +0000 (09:33 +0000)
commita286b6f6c7f6b327fad2a7081d7df88a4c83ce11
tree510a4abfe4d660d2b33e3d1a8065d2c84b4ef3fa
parent8bff6407ba142423e2498d638e7a49ed32e89553
Resolve timing issue with logging locks for Hot Standby.
We log AccessExclusiveLocks for replay onto standby nodes,
but because of timing issues on ProcArray it is possible to
log a lock that is still held by a just committed transaction
that is very soon to be removed. To avoid any timing issue we
avoid applying locks made by transactions with InvalidXid.

Simon Riggs, bug report Tom Lane, diagnosis Pavan Deolasee
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/lock.c
src/include/storage/standby.h