diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2012-11-13 15:58:05 -0300 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2012-11-13 15:58:05 -0300 |
commit | d0d58f7aa94986edbab6c000470707b90ef37d54 (patch) | |
tree | ef212f2808b27fc4dd846a311301be9ccafadff1 /src/backend/storage/ipc/standby.c | |
parent | 634e148dcaa1ec77aba4f5eac883285e8f225268 (diff) |
Clarify docs on hot standby lock release
Andres Freund and Simon Riggs
Diffstat (limited to 'src/backend/storage/ipc/standby.c')
-rw-r--r-- | src/backend/storage/ipc/standby.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 1e51914d051..fdec0eb2250 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -509,6 +509,10 @@ CheckRecoveryConflictDeadlock(void) * RelationLockList, so we can keep track of the various entries made by * the Startup process's virtual xid in the shared lock table. * + * We record the lock against the top-level xid, rather than individual + * subtransaction xids. This means AccessExclusiveLocks held by aborted + * subtransactions are not released as early as possible on standbys. + * * List elements use type xl_rel_lock, since the WAL record type exactly * matches the information that we need to keep track of. * @@ -642,8 +646,8 @@ StandbyReleaseAllLocks(void) /* * StandbyReleaseOldLocks - * Release standby locks held by XIDs that aren't running, as long - * as they're not prepared transactions. + * Release standby locks held by top-level XIDs that aren't running, + * as long as they're not prepared transactions. */ void StandbyReleaseOldLocks(int nxids, TransactionId *xids) |