]> 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:31:07 +0000 (09:31 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 1 Feb 2012 09:31:07 +0000 (09:31 +0000)
commit8572cc495cd07d4f4a59624d275a75b45340a3b2
tree779a143f83b84fdff88205d2985282a4b74fb410
parentb896e1e8527b7b4831222b5f7739c860dc922059
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