forked from greenplum-db/gpdb-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resqueue: Fix statement leak for holdable cursors
This is a 6X backport of commit: 48d9db0 There were minor conflicts due to the use of FALSE v false for holdsStrongLockCount, differences in the type for rsqcountlimit and rsqcountvalue, and a change from session #4 -> #3 in the ans file. Original commit message follows: Creating cursors "with hold" would clean up the locallock prematurely during transaction commit for the DECLARE CURSOR command: RemoveLocalLock lock.c:1406 LockReleaseAll lock.c:2313 ProcReleaseLocks proc.c:900 ResourceOwnerReleaseInternal resowner.c:320 ResourceOwnerRelease resowner.c:225 CommitTransaction xact.c:2818 This would cause an early exit in ResLockRelease(): LOG: Resource queue %d: no lock to release and then subsequently the assertion failure: FailedAssertion(""!(SHMQueueEmpty(&(MyProc->myProcLocks[i])))"", File: ""proc.c"", Line: 994 indicating a failure to clean up the resource queue locks, leading to a statement leak in the associated resource queue. This behavior was inadvertently introduced when we merged upstream commit 3cba899, for 6X_STABLE. The fix here is to ensure we don't accidentally remove a LOCALLOCK associated with a resource queue, in LockReleaseAll(). We also take the trouble to add more commentary about how we expect LOCALLOCK fields to be used in the context of resource queues. Co-authored-by: xuejing zhao <zxuejing@vmware.com> Co-authored-by: Zhenghua Lyu <kainwen@gmail.com>
- Loading branch information
1 parent
f4f6c53
commit 6833e62
Showing
5 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters