diff options
author | Simon Riggs | 2009-10-07 13:50:52 +0000 |
---|---|---|
committer | Simon Riggs | 2009-10-07 13:50:52 +0000 |
commit | db82165c0084a7e3f0c838c4b019be0b04703381 (patch) | |
tree | e8e56a44184447d48f267e340ba15c5234471a5f | |
parent | 4c10a767f23d918cdde8366408d88b1c801ca1c9 (diff) |
Correctly handle abort of a subtransaction that is an overflowed subtransaction on primary, so on standby the subxid has already been removed from KnownAssignedXids by an xid assignment record. We check subtrans to see if xid is valid there.hot_standby
-rw-r--r-- | src/backend/storage/ipc/procarray.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index f6f50be01d..031a6a26a0 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -2561,8 +2561,15 @@ KnownAssignedXidsRemove(TransactionId xid, bool report_error) if (!found && report_error) { - KnownAssignedXidsDisplay(LOG); - elog(ERROR, "cannot remove KnownAssignedXid %u", xid); + /* + * Check to see whether we have updated subtrans with this xid. + * If we did, its OK that it is no longer present in KnownAssignedXids + */ + if (!TransactionIdIsValid(SubTransGetParent(xid))) + { + KnownAssignedXidsDisplay(LOG); + elog(ERROR, "cannot remove KnownAssignedXid %u", xid); + } } } |