-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3995 [YSQL] Support deferrable for foreign key constraints
Summary: Deferred triggers access tuplestore at the end of subtransaction (after call of `AfterTriggerEndQuery` function). But it is no accessible as pointer to tuplestore is stored in `query_stack` which is already empty at this point. To solve the issue pointer to tuplestore for deferred trigger is be stored in new field `ybc_txn_fdw_tuplestore` of the `AfterTriggerSharedData` structure. **Additional changes** Deferred triggers are fired from the `CommitTransaction` function and YB transaction must not be committed before that time. Calling of `YBCPgCommitTransaction` function is moved inside `CommitTransaction` function. Test Plan: Postgresql regression tests were uncommented ``` ./yb_build.sh --java-test org.yb.pgsql.TestPgForeignKey ./yb_build.sh --cxx-test pg_on_conflict-test --gtest_filter PgOnConflictTest.ValidSessionAfterTxnCommitConflict ``` Reviewers: mikhail, neha, mihnea Reviewed By: mihnea Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D8379
- Loading branch information
1 parent
13b0c35
commit 83a63c2
Showing
16 changed files
with
381 additions
and
332 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
Oops, something went wrong.