]> granicus.if.org Git - postgresql/commit
Resolve timing issue with logging locks for Hot Standby.
authorSimon Riggs <simon@2ndQuadrant.com>
Mon, 23 Jan 2012 23:37:32 +0000 (23:37 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Mon, 23 Jan 2012 23:37:32 +0000 (23:37 +0000)
commitc172b7b02e6f6008d6dad66ddee8f67faf223c5b
tree3bc2897948a8e3e09acddf21ca89a45d6f4f58ce
parentb8a91d9d1c7ec75aaecf13df687ec7b5b0ed35a6
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